« "Old" Technology with Staying Power | Main | AutoCAD 2005 »

Feb 05, 2004

TIPS: Macros

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.

TrackBack

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

Listed below are links to weblogs that reference TIPS: Macros:

» AutoCAD Tips: Macros from Between the Lines
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 [Read More]

Comments

I am trying to write a macro that would switch my paperspace background from black to white with the click of a button. Displaying all color lines to black then clicking the button again to reverse the process. Can you help?

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.

Search This Blog

  • Search 2,000+ Posts:
     

Advertisements


Blog powered by TypePad
Member since 12/2003