VisioPageContent
VisioPageContent
gives access to all instances of VisioShapes
and VisioConnects
present on the given page
, as
well exposes an API useful in converting page contents to JointJS Cells using pageContent.toGraphCells([,opt])
method.
To work with page content, modifying shapes etc., loading VisioPageContent is always the first step. Provided API allows fetching any kind of entity that is part of the page content.
Methods​
getConnect()​
visioPageContent.getConnect(shapeId: number): VisioConnect | null;
Return a VisioConnect
associated with the provided shapeId
. If no such shape exists, return undefined
.
As VisioConnect contains connection metadata, it always points to the actual VisioShape that is a visual representation of the connection.
getConnects()​
visioPageContent.getConnects(): VisioConnect[];
Return all VisioConnects
present in the page content.
getElementShapes()​
visioPageContent.getElementShapes(): VisioShape[];
Return all VisioShape
's that would be identified as Element
in JointJS.
getFonts()​
visioPageContent.getFonts(): string[];
Return an array
of fonts used by shapes on the page. If no fonts are defined, return an empty array
.
getForeignShape()​
visioPageContent.getForeignShape(archivePath: string): VisioShape | null;
Return VisioShape
considered foreign (i.e. image), with the given path
within the VisioArchive
document. If
there is no shape for the given path, method will return undefined