SDK:Tool or Menu Command?
.SDK|SDK ..SDK:Types|SDK Types ..SDK:Using the SDK|Using the SDK ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference
Tool or Menu Command?
Many plug-ins could possibly be written as tools or menu commands, but there is usually a compelling reason to choose one over the other. Functionality that should have been implemented as a menu command that is wrapped in a tool may seem awkward to a user and vice versa. If the user doesn’t feel comfortable with your plug-in, then no matter how important you may think it is to them, they probably will not use it.
When deciding how to implement your plug-in, consider the following guidelines:
- Menu Commands:
- Menu commands usually interact with the user only through dialogs and often don’t have any interface. Menu commands are appropriate when an action is to be performed on the selection or the document as a whole.
- A tool is the appropriate choice if the user will need to interact with the drawing or if mouse input is required. Unless you are implementing a new selection tool, the primary focus of a tool’s interaction should not be selecting the objects to operate on. If you find that this is the case, try to implement your plug-in as a menu command and let the user select the objects with the selection tool. Good examples of tools are creation tools and the 3D view tools.
The Plug-in and the User | The Definition of a Plug-in | Tool or Menu Command | Communication Between VectorWorks and Plug-ins | Global Data