Listing current available macros/commands...

Ryan Bell

Usenet Archive
Joined
Jul 30, 2003
Messages
3
Reaction score
0
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
 
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
 
I've not loaded ADT yet on my system to check.

You could also use (if (not (c:<command_name>)) (do_this_or_that))
 
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.
 
Great! This and the other commands were what I was looking for. Thanks a lot for everybody's help!

Ryan Bell
Architectural Alliance Inc
 

Latest threads

Back
Top