Listing current available macros/commands...

Discussion in 'AutoCAD' started by Ryan Bell, Jul 30, 2003.

  1. Ryan Bell

    Ryan Bell Guest

    If the answer to this question is in a FAQ, I apologize and request
    directions to the FAQ.

    Is there a way to list all of the macros and commands available in a session
    of AutoCAD? For example, if I write a macro called "mymacro" [creating it
    with (defun c:mymacro () ... ) ], load it into AutoCAD and type MYMACRO it
    runs. This is good so long as I know that there is a macro out there with
    the name "mymacro". But what if I don't know the name (or forgot)? So, my
    question is how can I list all the magic words that don't return "Unknown
    Command" when you type them in?

    Also, if there is a method of doing the above, can it also list
    lisp-access-only macros [ie macros created using the syntax (defun
    myLispMacro () ... )]. And if so, can it even give you an idea of what
    arguments apply to said macro?

    The reason I ask is that I am writing some macros in Lisp and VBA for
    automating Architectural Desktop tasks. Unfortunately, the documentation
    seems to be incomplete and many objects have no object type in VBA (Display
    Props for example). From research on the web I found some VBA macros
    specifically for ADT (http://www.cadmin.com/VBA_for_ADT/Introduction.htm).
    One of these macros uses an undocumented lisp-access-only macro entitled
    "AecImportLayerKeyingStyle" with the syntax of (AecImportLayerKeyingStyle
    Drawing_Path Layer_Key_Style) where "Drawing_Path" is the file location and
    "Layer_Key_Style" is the Layer Key Style name that you want to import.
    Without the use of this macro, the user would have to do this manually
    through many GUI dialogs, because there is no way to do it currently from
    within VBA.

    Also, many ADT Command-line-only commands are not documented either (such as
    "-WALLMODIFY").

    Any direction or help would be greatly appreciated. Thanks!

    Ryan Bell
    Architectural Alliance Inc
     
    Ryan Bell, Jul 30, 2003
    #1
  2. Ryan Bell

    Rudy Tovar Guest

    (atoms-family 0)

    --
    Rodolfo Tovar
    www.Cadentity.com
    AUTODESK
    Authorized Developer
    MASi
    (Modulated Architectural Symbols Innovated)
    Version 2.01
    6 yrs Time Tested and it Works....
    Coming Soon.....
     
    Rudy Tovar, Jul 30, 2003
    #2
  3. Ryan Bell

    Murph Guest

    Try entering LSP at the command line.

    Murph
     
    Murph, Jul 30, 2003
    #3
  4. Ryan Bell

    Ryan Bell Guest

    Thank you both, Rudy and Murph, for your quick replies!

    Both (atoms-family 0) and LSP are a good start, but they don't list all of
    the Commands created by ADT. Commands like "AECWALLADD", "AECWINDOWADD",
    etc don't show up with either command. Is there a VBA equivalent of
    (atoms-family 0) that I need to use to list the ADT added commands?

    Thanks!

    Ryan Bell
    Architectural Alliance Inc
     
    Ryan Bell, Jul 30, 2003
    #4
  5. Ryan Bell

    Rudy Tovar Guest

    I've not loaded ADT yet on my system to check.

    You could also use (if (not (c:<command_name>)) (do_this_or_that))

    --
    Rodolfo Tovar
    www.Cadentity.com
    AUTODESK
    Authorized Developer
    MASi
    (Modulated Architectural Symbols Innovated)
    Version 2.01
    6 yrs Time Tested and it Works....
    Coming Soon.....
     
    Rudy Tovar, Jul 30, 2003
    #5
  6. Ryan Bell

    Dan Allen Guest

    try ARX > Command

    but first LOGFILEON, and set QAFLAGS to 2

    I believe it's best to close all but one drawing as each drawing has
    separate namespace & command list.

    LOGFILEOFF to stop logging

    LOGFILENAME tells you where it saved.
     
    Dan Allen, Jul 30, 2003
    #6
  7. Ryan Bell

    Ryan Bell Guest

    Great! This and the other commands were what I was looking for. Thanks a
    lot for everybody's help!

    Ryan Bell
    Architectural Alliance Inc
     
    Ryan Bell, Jul 30, 2003
    #7
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.