Drop method
Creates a new Shape or Master object by dropping an object onto a receiving object such as a stencil, drawing page, or group.
Version added
2.0
Syntax
| |
objRet |
The Master or Shape object created by dropping dropObject. |
object |
Required. An expression that returns an object in the Applies to list. The object to receive dropObject. |
dropObject |
Required. The object to drop. While this is typically a Visio object such as a Master, Shape, or Selection object; it can be any OLE object that provides an IDataObject interface. |
x |
Required Integer. The x-coordinate at which to place the center of the shape's width or PinX. |
y |
Required Integer. The y-coordinate at which to place the center of the shape's height or PinY. |
Remarks
Using the Drop method is similar to dragging and dropping a shape with the mouse. The object dropped (dropObject) can be a master or a shape on the drawing page.
To add a shape to a group or on a drawing page, apply the Drop method to a Shape or Page object, respectively. The center of the shape's width-height box is positioned at the specified coordinates, and a Shape object that represents the shape that is created is returned. When applying this method to a Shape object, make sure that the Shape object represents a group.
If dropObject is a Master, the pin of the master is dropped at the specified coordinates. A master's pin is often, but not necessarily, at its center of rotation.
To create a new master in a stencil, apply the Drop method to a Document object that represents a stencil (the stencil must be opened as an original or a copy rather than read-only). In this case, the x and y arguments are ignored, and the new master that is created is returned.