Shape.Disconnect method (Visio)
Unglues the specified connector end points and offsets them the specified amount from the shapes to which they were joined.
Syntax
expression. Disconnect
( _ConnectorEnd_
, _OffsetX_
, _OffsetY_
, _Units_
)
expression A variable that represents a Shape object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
ConnectorEnd | Required | VisConnectorEnds | The end of the connector to disconnect. |
OffsetX | Required | Double | The x-distance that the connector end is moved away from the shape. |
OffsetY | Required | Double | The y-distance that the connector end is moved away from the shape. |
Units | Required | VisUnitCodes | The units of measure for the assigned offset values. |
Return value
Nothing
Remarks
ConnectorEnd must be one of the following VisConnectorEnds constants.
Constant | Value | Description |
---|---|---|
visConnectorBeginPoint | 0 | The begin point of the connector. |
visConnectorEndPoint | 1 | The end point of the connector. |
visConnectorBothEnds | 2 | Both the begin and the end point of the connector. |
When you call Disconnect on a connector shape (a 1D routable shape), one or both endpoints of the connector are unglued from their target shapes, based on the specified ConnectorEnd parameter value. If a specified endpoint is not glued, Microsoft Visio takes no action.
Visio offsets the endpoint(s) from their current position by the amount specified by OffsetX , OffsetY , and Units. Offset values of 0 mean that the endpoints don't move.
The Disconnect method does not apply to non-connector shapes. If you call Disconnect on a non-connector shape or on a shape in a master, Visio returns an Invalid Source error.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.