API Reference

Class

VisioConnector

Namespace OfficeIMO.Visio
Assembly OfficeIMO.Visio

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

Accepted by parameters

Constructors

VisioConnector 2 overloads
public VisioConnector(VisioShape from, VisioShape to) #

Initializes a new instance of the VisioConnector class connecting two shapes.

Parameters

from OfficeIMO.Visio.VisioShape requiredposition: 0
Shape from which the connector starts.
to OfficeIMO.Visio.VisioShape requiredposition: 1
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 requiredposition: 0
Identifier of the connector.
from OfficeIMO.Visio.VisioShape requiredposition: 1
Shape from which the connector starts.
to OfficeIMO.Visio.VisioShape requiredposition: 2
Shape at which the connector ends.

Methods

AddHyperlink 2 overloads
public VisioConnector ClearProtection() #
Returns: VisioConnector

Clears explicit ShapeSheet protection cells from this connector.

public VisioConnector ClearRoutingPolicy() #
Returns: VisioConnector

Clears explicit Shape Layout routing override cells from this connector.

public VisioShapeDataRow FindShapeData(String name) #
Returns: VisioShapeDataRow

Finds a Shape Data row by row name.

Parameters

name System.String requiredposition: 0
Shape Data row name.
public String GetShapeDataValue(String name) #
Returns: String

Gets a Shape Data value by row name.

Parameters

name System.String requiredposition: 0
Shape Data row name.
public VisioConnector LockEndpoints(Boolean locked = true) #
Returns: VisioConnector

Locks or unlocks connector endpoints.

Parameters

locked System.Boolean = true optionalposition: 0
public VisioConnector Protect(Action<VisioProtection> configure) #
Returns: VisioConnector

Configures ShapeSheet protection cells for this connector.

Parameters

configure System.Action{OfficeIMO.Visio.VisioProtection} requiredposition: 0
Protection configuration delegate.
public VisioShapeDataRow SetShapeData(String name, String value, String label = null, Nullable<VisioShapeDataType> type = null, String prompt = null, String format = null) #
Returns: VisioShapeDataRow

Sets or creates a Shape Data row.

Parameters

name System.String requiredposition: 0
Shape Data row name.
value System.String requiredposition: 1
Shape Data value.
label System.String = null optionalposition: 2
Optional label shown in Visio's Shape Data window.
type System.Nullable{OfficeIMO.Visio.VisioShapeDataType} = null optionalposition: 3
Optional Shape Data type.
prompt System.String = null optionalposition: 4
Optional help prompt.
format System.String = null optionalposition: 5
Optional format picture or list values.

Properties

public String Id { get; set; } #

Identifier of the connector.

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<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) #
Returns: VisioConnector

Applies a reusable style to a shape.

Parameters

shape OfficeIMO.Visio.VisioShape requiredposition: 0
style OfficeIMO.Visio.VisioShapeStyle requiredposition: 1
public static VisioConnector ApplyTextStyle(VisioConnector connector, VisioTextStyle style) #
Returns: VisioConnector

Applies a reusable text style to a shape.

Parameters

shape OfficeIMO.Visio.VisioShape requiredposition: 0
style OfficeIMO.Visio.VisioTextStyle requiredposition: 1
public static VisioConnector ClearRoute(VisioConnector connector) #
Returns: VisioConnector

Removes explicit connector waypoints and returns the connector to dynamic routing.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
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) #
Returns: VisioConnector

Places connector text along the connector path.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector whose label should be placed.
position System.Double = 0.5 optionalposition: 1
Position along the connector path, from 0.0 to 1.0.
offsetX System.Double = 0 optionalposition: 2
Horizontal page-coordinate offset.
offsetY System.Double = 0 optionalposition: 3
Vertical page-coordinate offset.
width System.Double = 1.25 optionalposition: 4
Label text box width in page units.
height System.Double = 0.3 optionalposition: 5
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) #
Returns: VisioConnector

Places connector text at an absolute page coordinate.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector whose label should be placed.
pinX System.Double requiredposition: 1
Text pin X coordinate.
pinY System.Double requiredposition: 2
Text pin Y coordinate.
width System.Double = 1.25 optionalposition: 3
Label text box width in page units.
height System.Double = 0.3 optionalposition: 4
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) #
Returns: VisioConnector

Resizes a connector label text box to fit its plain text using deterministic OfficeIMO.Drawing measurement.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector whose label box should be resized.
fontInfo System.Nullable{OfficeIMO.Drawing.OfficeFontInfo} = null optionalposition: 1
Font descriptor used for measurement. Uses connector text style, then Office default, when omitted.
horizontalPadding System.Double = 0.12 optionalposition: 2
Horizontal padding in inches.
verticalPadding System.Double = 0.06 optionalposition: 3
Vertical padding in inches.
minimumWidth System.Double = 0.45 optionalposition: 4
Minimum resulting label width in inches.
minimumHeight System.Double = 0.22 optionalposition: 5
Minimum resulting label height in inches.
maximumWidth System.Nullable{System.Double} = null optionalposition: 6
Optional maximum label width in inches. Text wraps by words when supplied.
public static VisioConnector RouteOrthogonal(VisioConnector connector, VisioConnectorRouteStyle style = Auto, Double offset = 0) #
Returns: VisioConnector

Generates a clean three-segment orthogonal route between connector endpoints.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector to route.
style OfficeIMO.Visio.VisioConnectorRouteStyle = Auto optionalposition: 1
Orthogonal route orientation.
offset System.Double = 0 optionalposition: 2
Optional offset applied to the center routing lane.
RouteOrthogonalAroundShapes 2 overloads
public static VisioConnector RouteOrthogonalAroundShapes(VisioConnector connector, IEnumerable<VisioShape> obstacles, Double padding = 0.15, Int32 maxLanes = 12) #
Returns: VisioConnector

Generates an orthogonal route that avoids unrelated obstacle shapes when a clear lane is available.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector to route.
obstacles System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape} requiredposition: 1
Shapes that the route should avoid. Source, target, containers, background surfaces, and generated adornments are ignored.
padding System.Double = 0.15 optionalposition: 2
Padding added around each obstacle while testing route intersections.
maxLanes System.Int32 = 12 optionalposition: 3
Number of positive and negative routing lanes to try on each axis.
public static VisioConnector RouteOrthogonalAroundShapes(VisioConnector connector, IEnumerable<VisioShape> obstacles, VisioConnectorRoutingOptions options) #
Returns: VisioConnector

Generates an orthogonal route that avoids unrelated obstacle shapes when a clear lane is available.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector to route.
obstacles System.Collections.Generic.IEnumerable{OfficeIMO.Visio.VisioShape} requiredposition: 1
Shapes that the route should avoid. Source and target shapes are ignored.
options OfficeIMO.Visio.VisioConnectorRoutingOptions requiredposition: 2
Routing options controlling padding, lane search, and whether zones/containers count as obstacles.
RouteThrough 2 overloads
public static VisioConnector RouteThrough(VisioConnector connector, params VisioConnectorWaypoint[] waypoints) #
Returns: VisioConnector

Replaces connector geometry with explicit page-coordinate waypoints.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector to route.
waypoints OfficeIMO.Visio.VisioConnectorWaypoint[] requiredposition: 1
Absolute page coordinates between start and end.
public static VisioConnector RouteThrough(VisioConnector connector, IEnumerable<VisioConnectorWaypoint> waypoints) #
Returns: VisioConnector

Replaces connector geometry with explicit page-coordinate waypoints.

Parameters

connector OfficeIMO.Visio.VisioConnector requiredposition: 0
Connector to route.
waypoints OfficeIMO.Visio.VisioConnectorWaypoint[] requiredposition: 1
Absolute page coordinates between start and end.