Search Blog

AutoCAD Exchange

Photos

  • www.flickr.com
    S. Hurley's items Go to S. Hurley's photostream

« Remove Change Tracking, Comments, and History from MS Word Documents | Main | More Great Feedback on this Blog from the CAD Industry »

05 February 2004

AutoCAD Tips: Macros

Ralph Grabowski of UpFront eZine and the new blog WorldCADAccess wrote a nice answer to a readers question on what a macro is. I also added some very helpful tutorial links to the bottom of this posting.


"Q: Would you please tell me what macros are please?
- student.ul.ie

A: A macro is anything more than a single command. For example, in AutoCAD you zoom into a windowed area with the ZOOM command, followed by the W option. When you assign that to a menu item or a toolbar button, "zoom w" is called a macro.

A macro can consist of just a command and an option, as shown above, or consist of many commands, their options, and other programming code (AutoCAD macros can include Diesel expressions and AutoLISP functions).

Macros often include additional code to make sure it works under all conditions. For example, "^C^C^C" is added as a prefix to cancel any AutoCAD command still running, while the _ (underscore) is added to ensure the macro works with any language version of AutoCAD (German, Japanese, and so on).

Programs other than AutoCAD don't necessarily allow macros; instead, they have their own programming interfaces, or might require you to learn VBA (Visual Basic for Applications) to write the equivalent of macros." http://worldcadaccess.typepad.com/blog/2004/02/tips_macros.html

Helpful resources on macros for AutoCAD:

  • AutoCAD - Example of using macros to automate your work: Faster block insertions

  • Applying Customization: Building More Complicated Macros

  • AutoCAD - Applying Customization: A LISP Macro Zoom

  • Applying Customization: Macros For Toggling Between Large and Small Cursors

  • Applying Customization: Writing LISP Macros Plus a Bonus 3D Toolchest

  • AutoCAD - Lock Viewports Toolbar Button Macro

  • Applying Customization: Building a Toolbar

    Cheers,
    -Shaan

  • TrackBack

    TrackBack URL for this entry:
    http://www.typepad.com/services/trackback/6a00d8341bfd0c53ef00d83480cc9669e2

    Listed below are links to weblogs that reference AutoCAD Tips: Macros:

    Comments