My Photo

Search

  • Search over 1500 posts

Latest Images

  • www.flickr.com
    S.Hurley's photos More of S.Hurley's photos

New AutoCAD Knowledge Base Articles

Feeds & Misc.

  • Add to Google
  • Over 8 million visitors since 2003!

Blog Tags

  • Read Between the Lines!

    Read -Between the Lines!

    Add a Between the Lines Image Badge to your site.
    Click Here

Blog powered by TypePad
Member since 08/2003

« 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/t/trackback/2691/437312

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

    Comments

    hay dear,

    could you please tell me first step for create the macros.
    means i know the auto cad but i want to make a macro, it's related with create new line type/shape.

    Regards,
    sachin

    Bob,

    All you need to do is use your tool palette and then on the line command icon right-click and set the propereties you would like that line to be drawn such as scale, layer etc. You can create multiple line comands on the tool palette for different properties or specs.

    Regards,
    Shaan

    To Whom it may concern,
    Hi. I just got AutoCad 2008. I want to know how to make a toolbar that will draw a line and the layer that relates to it so all I have to do is toggle the toolbar button to get the line, color and line type all in one. I know this can be done because I used to set up Fastcad to do it and if it can be done in DOS, I know it can be done in AutoCad. My E-Mail address is bob1@alltel.net. Thank you for your time and efforts in this matter.

    In God's loving service,
    Bob

    Claude,

    Your English is great and much better than my French. I would suggest looking at Sheet Sets in AutoCAD as it sounds like you want to create new sheets with callouts. An excellent resource for Sheet Sets and call out objects is Heidi's blog
    http://heidihewett.blogs.com/my_weblog/sheet_sets/index.html

    Regards,
    Shaan

    HI,
    Could you help me with Autocad ?
    How could I make a macro which would create and display a new sheet and put a new number automatically incremented as an information, this after a click on an object (circle, line etc.)
    I hope i'm clear, sorry for my english, I'm french and I studied english by myself
    Thanks a lot for your help
    Claude

    can i find out where and what the macro scrips are for
    autocad. i have loaded extended LT facilities and am
    trying to isolate layers by pick , just like the layiso
    command in full autocad express. can anyone help please.
    cb

    Post a comment

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

    If you have a TypeKey or TypePad account, please Sign In