DropActions Property [Visio 2003 SDK Documentation]

Defines special actions to be performed on shapes created by using a master shortcut.

strRet = object**.DropActions**

object**.DropActions** = strExpression

strRet     String. One or more actions separated by semicolons. See example in Remarks.

object     Required. An expression that returns a MasterShortcut object.

strExpression     Required String. One or more actions separated by semicolons. See example in Remarks.

Version added

2000

Remarks

When you drop a master shortcut onto a drawing page, Microsoft Office Visio applies any drop actions in the shortcut to the newly created shape. Each drop action defines a particular value or formula to be assigned to a particular cell in the new shape.

Because drop actions are defined by the shortcut, not the target master, it is possible to create several shortcuts that refer to the same target master, but which produce very different effects when dropped onto the drawing page.

The DropActions property can be blank, or it can define a series of one or more individual drop actions. Actions are separated by semicolons (;). Each action consists of the name of the cell to change, followed by the formula to apply to that cell, separated by an equals sign (=). For example:

Angle=45; FillForegnd=7; Width=(ThePage!PageWidth / 2 - 4cm)

The application does not validate drop actions until they are applied to a new shape. If the DropActions property contains syntax errors or invalid cell names, the offending actions are ignored. However, if the application is running in developer mode, an error message is displayed that identifies the invalid action and the cause of the error. When using shortcut drop actions in your code, always test your shortcuts in developer mode to make sure the drop actions do not contain errors. To run in developer mode, on the Tools menu, click Options, click the Advanced tab, and then select the Run in developer mode check box.

Applies to | MasterShortcut object