Add Your Plugin to an AutoCAD Menu26 Sep, 2013 By: Andrew G. Roe
Load and run a plugin the quick way — without typing.
Run the Script and Custom Command
To run the script and custom command:
1. Click the Run Script icon in the Manage tab of the ribbon. (You can also type Script in the Command line and press Enter.) The Select Script File dialog box is displayed.
2. Navigate to the previously created file and select it.
3. Click Open to run the script.
4. From the Modify menu, select MyCircleCommand. The command is executed, creating a circle and text as explained in the previous article.
This example demonstrates one way to decrease typing and further automate use of your plugins. You can use scripts and custom commands in various other combinations to meet your needs. You can also assign custom commands to other portions of the AutoCAD interface, such as the ribbon and toolbars. If you’re so inclined, you can even create keyboard shortcuts, assign macros to mouse buttons, and use custom commands in conjunction with LISP files. AutoCAD’s online help tool describes these options in greater detail. The wide variety of customization choices, available since the early days of AutoCAD, can be coupled with modern technology such as .NET plugins to make AutoCAD more efficient for you.
In future articles, I'll continue to explore additional facets of AutoCAD programming, including working with Autodesk’s vertical products. If you would like to suggest a topic, feel free to send me an e-mail.
About the Author: Andrew G. Roe
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD Video Tips. Subscribe to the free Cadalyst Video Picks newsletter, and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!