API Reference
VisioConnector
Connects two shapes together.
Inheritance
- Object
- VisioConnector
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Extension method VisioConnector.ApplyStyle
- Extension method VisioConnector.ApplyTextStyle
- Extension method VisioConnector.ClearRoute
- Extension method VisioConnector.PlaceLabel
- Extension method VisioConnector.PlaceLabelAt
- Extension method VisioConnector.ResizeLabelToText
- Extension method VisioConnector.RouteOrthogonal
- Extension method VisioConnector.RouteOrthogonalAroundShapes
- Extension method VisioConnector.RouteOrthogonalAroundShapes
- Extension method VisioConnector.RouteThrough
- Extension method VisioConnector.RouteThrough
- Method VisioConnector.ClearProtection
- Method VisioConnector.ClearRoutingPolicy
- Method VisioConnector.LockEndpoints
- Method VisioConnector.Protect
- Method VisioConnectorRoutingExtensions.ClearRoute
- Method VisioConnectorRoutingExtensions.PlaceLabel
- Method VisioConnectorRoutingExtensions.PlaceLabelAt
- Property VisioConnectorRoutingOptions.ConnectorCrossingReferences
- Method VisioConnectorSelection.GetEnumerator
- Property VisioConnectorSelection.Item
- Method VisioLayoutExtensions.ResizeLabelToText
- Extension method VisioPage.ConnectedConnectors
- Extension method VisioPage.ConnectorsInLayer
- Extension method VisioPage.ConnectorsWithHyperlink
- Extension method VisioPage.ConnectorsWithHyperlinks
- Extension method VisioPage.ConnectorsWithProtection
- Extension method VisioPage.ConnectorsWithProtection
- Extension method VisioPage.IncomingConnectors
- Extension method VisioPage.OutgoingConnectors
- Method VisioPage.AddConnector
- Method VisioPage.AddConnector
- Method VisioPage.RetargetConnectors
- Property VisioPage.Connectors
- Method VisioPageQueryExtensions.ConnectedConnectors
- Method VisioPageQueryExtensions.ConnectorsInLayer
- Method VisioPageQueryExtensions.ConnectorsWithHyperlink
- Method VisioPageQueryExtensions.ConnectorsWithHyperlinks
- Method VisioPageQueryExtensions.ConnectorsWithProtection
- Method VisioPageQueryExtensions.ConnectorsWithProtection
- Method VisioPageQueryExtensions.IncomingConnectors
- Method VisioPageQueryExtensions.OutgoingConnectors
- Method VisioShapeDataSchema.ApplyToConnectors
- Property VisioShapeDuplicationOptions.ConnectorIdFactory
Accepted by parameters
- Constructor VisioFluentConnector.VisioFluentConnector
- Method VisioFluentPage.Connectors
- Extension method VisioConnector.ClearRoute
- Extension method VisioConnector.PlaceLabel
- Extension method VisioConnector.PlaceLabelAt
- Extension method VisioConnector.ResizeLabelToText
- Extension method VisioConnector.RouteOrthogonal
- Extension method VisioConnector.RouteOrthogonalAroundShapes
- Extension method VisioConnector.RouteOrthogonalAroundShapes
- Extension method VisioConnector.RouteThrough
- Extension method VisioConnector.RouteThrough
- Method VisioConnectorRoutingExtensions.ClearRoute
- Method VisioConnectorRoutingExtensions.PlaceLabel
- Method VisioConnectorRoutingExtensions.PlaceLabelAt
- Method VisioConnectorRoutingExtensions.RouteOrthogonal
- Method VisioConnectorRoutingExtensions.RouteOrthogonalAroundShapes
- Method VisioConnectorRoutingExtensions.RouteOrthogonalAroundShapes
- Method VisioConnectorRoutingExtensions.RouteThrough
- Method VisioConnectorRoutingExtensions.RouteThrough
- Constructor VisioConnectorSelection.VisioConnectorSelection
- Extension method VisioConnectorSelection.RouteOrthogonal
- Extension method VisioConnectorSelection.RouteOrthogonalAroundShapes
- Extension method VisioConnectorSelection.RouteOrthogonalAroundShapes
- Extension method VisioConnectorSelection.RouteThrough
- Method VisioConnectorStyle.ApplyTo
- Method VisioLayoutExtensions.ResizeLabelToText
- Extension method VisioPage.SelectConnectors
- Method VisioPage.AddToLayer
- Method VisioPage.ReconnectConnector
- Method VisioPage.ReconnectConnectorEnd
- Method VisioPage.ReconnectConnectorStart
- Method VisioPageQueryExtensions.SelectConnectors
- Method VisioShapeDataSchema.ApplyTo
- Method VisioShapeDataSchema.ApplyToConnectors
- Method VisioShapeDataSchema.Validate
- Method VisioStyleExtensions.ApplyStyle
- Method VisioStyleExtensions.ApplyTextStyle
Constructors
public VisioConnector(VisioShape from, VisioShape to) #Initializes a new instance of the VisioConnector class connecting two shapes.
Parameters
- from OfficeIMO.Visio.VisioShape
- Shape from which the connector starts.
- to OfficeIMO.Visio.VisioShape
- Shape at which the connector ends.
public VisioConnector(String id, VisioShape from, VisioShape to) #Initializes a new instance of the VisioConnector class with an explicit identifier.
Parameters
- id System.String
- Identifier of the connector.
- from OfficeIMO.Visio.VisioShape
- Shape from which the connector starts.
- to OfficeIMO.Visio.VisioShape
- Shape at which the connector ends.
Methods
public VisioHyperlink AddHyperlink(String address, String description = null, String subAddress = null) #VisioHyperlinkAdds a hyperlink to this connector.
Parameters
- address System.String
- External hyperlink address.
- description System.String = null
- Optional display description.
- subAddress System.String = null
- Optional internal sub-address.
Returns
The created hyperlink row.
public VisioHyperlink AddHyperlink(Uri address, String description = null, String subAddress = null) #VisioHyperlinkAdds a hyperlink to this connector.
Parameters
- address System.Uri
- External hyperlink address.
- description System.String = null
- Optional display description.
- subAddress System.String = null
- Optional internal sub-address.
Returns
The created hyperlink row.
public VisioConnector ClearProtection() #VisioConnectorClears explicit ShapeSheet protection cells from this connector.
public VisioConnector ClearRoutingPolicy() #VisioConnectorClears explicit Shape Layout routing override cells from this connector.
public VisioShapeDataRow FindShapeData(String name) #VisioShapeDataRowFinds a Shape Data row by row name.
Parameters
- name System.String
- Shape Data row name.
public String GetShapeDataValue(String name) #StringGets a Shape Data value by row name.
Parameters
- name System.String
- Shape Data row name.
public VisioConnector LockEndpoints(Boolean locked = true) #VisioConnectorLocks or unlocks connector endpoints.
Parameters
- locked System.Boolean = true
public VisioConnector Protect(Action<VisioProtection> configure) #VisioConnectorConfigures ShapeSheet protection cells for this connector.
Parameters
- configure System.Action{OfficeIMO.Visio.VisioProtection}
- Protection configuration delegate.
public VisioShapeDataRow SetShapeData(String name, String value, String label = null, Nullable<VisioShapeDataType> type = null, String prompt = null, String format = null) #VisioShapeDataRowSets or creates a Shape Data row.
Parameters
- name System.String
- Shape Data row name.
- value System.String
- Shape Data value.
- label System.String = null
- Optional label shown in Visio's Shape Data window.
- type System.Nullable{OfficeIMO.Visio.VisioShapeDataType} = null
- Optional Shape Data type.
- prompt System.String = null
- Optional help prompt.
- format System.String = null
- Optional format picture or list values.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public VisioShape From { get; set; } #Shape from which the connector starts.
public VisioShape To { get; set; } #Shape at which the connector ends.
public VisioConnectionPoint FromConnectionPoint { get; set; } #Connection point on the starting shape.
public VisioConnectionPoint ToConnectionPoint { get; set; } #Connection point on the ending shape.
public ConnectorKind Kind { get; set; } #Gets or sets the kind of connector.
public Nullable<EndArrow> BeginArrow { get; set; } #Gets or sets the arrow style at the beginning of the connector.
public Nullable<EndArrow> EndArrow { get; set; } #Gets or sets the arrow style at the end of the connector.
public String Label { get; set; } #Optional label displayed alongside the connector.
public VisioConnectorLabelPlacement LabelPlacement { get; set; } #Optional placement information for connector text.
public VisioTextStyle TextStyle { get; set; } #Gets or sets whole-label text formatting for this connector.
public IList<VisioConnectorWaypoint> Waypoints { get; } #Explicit page-coordinate waypoints between the start and end of the connector.
public ISet<String> LayerNames { get; } #Page layer names this connector belongs to.
public IList<VisioHyperlink> Hyperlinks { get; } #Hyperlinks attached to this connector.
public IList<VisioShapeDataRow> ShapeData { get; } #Visio Shape Data rows attached to this connector.
public Dictionary<String, String> Data { get; } #Arbitrary data associated with the connector.
public VisioProtection Protection { get; } #Visio ShapeSheet protection cells controlling interactive connector editing in Visio.
public Nullable<VisioPageRouteStyle> RouteStyle { get; set; } #Gets or sets the connector-level Visio routing style. When null, Visio uses the page default.
public Nullable<VisioLineRouteExtension> RouteAppearance { get; set; } #Gets or sets the connector-level appearance for routed connectors.
public Nullable<VisioLineJumpStyle> LineJumpStyle { get; set; } #Gets or sets the connector-level line jump style.
public Nullable<VisioConnectorLineJumpCode> LineJumpCode { get; set; } #Gets or sets when this connector receives line jumps.
public Nullable<VisioHorizontalLineJumpDirection> HorizontalJumpDirection { get; set; } #Gets or sets the jump direction for horizontal segments of this connector.
public Nullable<VisioVerticalLineJumpDirection> VerticalJumpDirection { get; set; } #Gets or sets the jump direction for vertical segments of this connector.
public Nullable<VisioConnectorRerouteBehavior> RerouteBehavior { get; set; } #Gets or sets when Visio may reroute this connector.
public OfficeColor LineColor { get; set; } #Line color of the connector.
public Double LineWeight { get; set; } #Line weight (thickness) of the connector.
public Int32 LinePattern { get; set; } #Line pattern (0=None, 1=Solid, 2=Dashed, etc.).
PreservedGeometrySections #Geometry sections captured from a loaded package so custom connector paths can be preserved on save.
Extension Methods
public static VisioConnector ApplyStyle(VisioConnector connector, VisioConnectorStyle style) #VisioConnectorApplies a reusable style to a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- style OfficeIMO.Visio.VisioShapeStyle
public static VisioConnector ApplyTextStyle(VisioConnector connector, VisioTextStyle style) #VisioConnectorApplies a reusable text style to a shape.
Parameters
- shape OfficeIMO.Visio.VisioShape
- style OfficeIMO.Visio.VisioTextStyle
public static VisioConnector ClearRoute(VisioConnector connector) #VisioConnectorRemoves explicit connector waypoints and returns the connector to dynamic routing.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to reset.
public static VisioConnector PlaceLabel(VisioConnector connector, Double position = 0.5, Double offsetX = 0, Double offsetY = 0, Double width = 1.25, Double height = 0.3) #VisioConnectorPlaces connector text along the connector path.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector whose label should be placed.
- position System.Double = 0.5
- Position along the connector path, from 0.0 to 1.0.
- offsetX System.Double = 0
- Horizontal page-coordinate offset.
- offsetY System.Double = 0
- Vertical page-coordinate offset.
- width System.Double = 1.25
- Label text box width in page units.
- height System.Double = 0.3
- Label text box height in page units.
public static VisioConnector PlaceLabelAt(VisioConnector connector, Double pinX, Double pinY, Double width = 1.25, Double height = 0.3) #VisioConnectorPlaces connector text at an absolute page coordinate.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector whose label should be placed.
- pinX System.Double
- Text pin X coordinate.
- pinY System.Double
- Text pin Y coordinate.
- width System.Double = 1.25
- Label text box width in page units.
- height System.Double = 0.3
- Label text box height in page units.
public static VisioConnector ResizeLabelToText(VisioConnector connector, Nullable<OfficeFontInfo> fontInfo = null, Double horizontalPadding = 0.12, Double verticalPadding = 0.06, Double minimumWidth = 0.45, Double minimumHeight = 0.22, Nullable<Double> maximumWidth = null) #VisioConnectorResizes a connector label text box to fit its plain text using deterministic OfficeIMO.Drawing measurement.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector whose label box should be resized.
- fontInfo System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} = null
- Font descriptor used for measurement. Uses connector text style, then Office default, when omitted.
- horizontalPadding System.Double = 0.12
- Horizontal padding in inches.
- verticalPadding System.Double = 0.06
- Vertical padding in inches.
- minimumWidth System.Double = 0.45
- Minimum resulting label width in inches.
- minimumHeight System.Double = 0.22
- Minimum resulting label height in inches.
- maximumWidth System.Nullable{System.Double} = null
- Optional maximum label width in inches. Text wraps by words when supplied.
public static VisioConnector RouteOrthogonal(VisioConnector connector, VisioConnectorRouteStyle style = Auto, Double offset = 0) #VisioConnectorGenerates a clean three-segment orthogonal route between connector endpoints.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to route.
- style OfficeIMO.Visio.VisioConnectorRouteStyle = Auto
- Orthogonal route orientation.
- offset System.Double = 0
- Optional offset applied to the center routing lane.
public static VisioConnector RouteOrthogonalAroundShapes(VisioConnector connector, IEnumerable<VisioShape> obstacles, Double padding = 0.15, Int32 maxLanes = 12) #VisioConnectorGenerates an orthogonal route that avoids unrelated obstacle shapes when a clear lane is available.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to route.
- obstacles System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape}
- Shapes that the route should avoid. Source, target, containers, background surfaces, and generated adornments are ignored.
- padding System.Double = 0.15
- Padding added around each obstacle while testing route intersections.
- maxLanes System.Int32 = 12
- Number of positive and negative routing lanes to try on each axis.
public static VisioConnector RouteOrthogonalAroundShapes(VisioConnector connector, IEnumerable<VisioShape> obstacles, VisioConnectorRoutingOptions options) #VisioConnectorGenerates an orthogonal route that avoids unrelated obstacle shapes when a clear lane is available.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to route.
- obstacles System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape}
- Shapes that the route should avoid. Source and target shapes are ignored.
- options OfficeIMO.Visio.VisioConnectorRoutingOptions
- Routing options controlling padding, lane search, and whether zones/containers count as obstacles.
public static VisioConnector RouteThrough(VisioConnector connector, params VisioConnectorWaypoint[] waypoints) #VisioConnectorReplaces connector geometry with explicit page-coordinate waypoints.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to route.
- waypoints OfficeIMO.Visio.VisioConnectorWaypoint[]
- Absolute page coordinates between start and end.
public static VisioConnector RouteThrough(VisioConnector connector, IEnumerable<VisioConnectorWaypoint> waypoints) #VisioConnectorReplaces connector geometry with explicit page-coordinate waypoints.
Parameters
- connector OfficeIMO.Visio.VisioConnector
- Connector to route.
- waypoints OfficeIMO.Visio.VisioConnectorWaypoint[]
- Absolute page coordinates between start and end.