VisioConnect
VisioConnect
represents a connection between two Visio Shapes. It contains metadata describing source and target
including which part of the Shape is used as an anchor.
An important concept to understand is that in Visio projects, a connection between two shapes consists of two entities:
Connect and a Shape, represented by VisioConnect and VisioShape within
the plugin. VisioConnect
contains metadata about the connection. It also points to the shape that visually represents
the connection, as well as source and target shapes.
Methodsβ
getShape()β
visioConnect.getShape(): VisioShape;
Return a VisioShape representing the connection itself.
getSource()β
visioConnect.getSource(): VisioShape | null;
Return a VisioShape representing the connection source shape. In case there is no source shape,
method will return null
.
getTarget()β
visioConnect.getTarget(): VisioShape | null;
Return a VisioShape representing the connection target shape. In case there is no source shape,
method will return null
.
toLinkAttributes()β
visioConnect.toLinkAttributes(
sourceElement: dia.Element,
targetElement: dia.Element
): dia.Link.Attributes | null;
Return JointJS Link attributes
, based on the VisioConnect properties and a provided sourceElement
and targetElement
.
Propertiesβ
There are several properties that can be accessed:
fromCellβ
visioConnect.fromCell: string;
String name of the VisioCell
from which the connection originates.
fromPartβ
visioConnect.fromPart: string;
Identifies the part of the Visio Shape from which a connection is made.
fromSheetβ
visioConnect.fromSheet: string;
INT id of the source VisioShape
.
toCellβ
visioConnect.toCell: string;
String name of the VisioCell
to which the connection is made.
toPartβ
visioConnect.toPart: string;
Identifies the part of the VisioShape
to
which a connection is made.
toSheetβ
visioConnect.toSheet: string;
INT id of the target VisioShape
.