Page.DropConnected method (Visio)
Creates a new Shape object on the page, places the new shape relative to the specified existing target shape, and adds a connector from the existing shape to the new shape. Returns the newly created shape.
Syntax
expression. DropConnected
( _ObjectToDrop_
, _TargetShape_
, _PlacementDir_
, _[Connector]_
)
expression A variable that represents a Page object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
ObjectToDrop | Required | [UNKNOWN] | The shape to add to the page. Can be a Master, MasterShortcut, Shape, or an IDataObject object. |
TargetShape | Required | Shape | The existing shape from which to align, space, and connect. |
PlacementDir | Required | VisAutoConnectDir | The direction from TargetShape in which to place ObjectToDrop. |
Connector | Optional | [UNKNOWN] | The connector to use. Can be a Master, MasterShortcut, Shape, or an IDataObject object. |
Return value
Shape
Remarks
The ObjectToDrop parameter must be an object that references a two-dimensional (2D) shape. If you pass a selection of shapes represented by an IDataObject object, Visio uses only the first of those shapes. If ObjectToDrop is not a valid Visio object, Visio returns an Invalid Parameter error. If ObjectToDrop is not a shape that matches the context of the method, Visio returns an Invalid Source error.
The TargetShape parameter must be a 2D top-level shape on the page. If TargetShape is invalid, Visio returns an Invalid Source error.
The PlacementDir parameter value must be one of the VisAutoConnectDir constants. If you pass visAutoConnectDirNone for PlacementDir , Visio places the shape in a default location (0,0) and then connects it; the shape is not placed in relation to the target.
The Connector parameter must be an object that references a one-dimensional (1D) routable shape. If you pass a selection of shapes represented by an IDataObject object, Visio uses only the first of those shapes. If Connector is not a valid Visio object, Visio returns an Invalid Parameter error. If Connector is not a shape that matches the context of the method, 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.