I'm sure this has been asked before, but I can't find a good answer so....
Is there any way to call an Autocad Electrical command in Lisp, without it opening the command dialog box? Specifically, I would like to call AECOMPONENT, and just name the component, not have to open the icon menu and search for it. Based on other advice I got (c:aecomponent) does not work, still pulls the icon menu up.
Any thoughts? Are there switches I can use to force this?
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
Yeah.. try (command "-aecomponent")
if that doesn't work you can try
(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object))(strcat "-aecomponent"))
@bhull1985 wrote:
Yeah.. try (command "-aecomponent")
if that doesn't work you can try
(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object))(strcat "-aecomponent"))
Tried both. No go. -aecomponent is unrecognized by AcadE. Take the "-" off, and I'm right back where I started. Must be this can't be done without more serious programming power than I have.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
Hmm.
Have you considered "loading" the menus via (command "menuload" "electrical.cuixname") and then trying your functions?
Usually you have to (command "menuload" "...") along with a (menucmd "...") in order to get something to appear on the menu bar so perhaps if you just load it into memory you can have access to the functions.
Otherwise go steal the appropriate lisp defuns from the electrical package and add into your own acaddoc
I think I'm just hosed. These are compiled commands. Probably no way of opening them up to see how they tick.
Well, this sets me back a long way in doing what I wanted to do. Thanks for trying to help though.
Chris Benner
Inventor Tube & Pipe, Vault Professional
Cad Tips Tricks & Workarounds | Twitter | LinkedIn
Autodesk University Classes:
Going With The Flow with Inventor Tube and Pipe | Increasing The Volume with Inventor Tube and Pipe | Power of the Autodesk Community | Getting to Know You | Inventor Styles & Standards |Managing Properties with Vault Professional | Vault Configuration | Vault - What is it & Why Do I Need It? | A Little Less Talk - Tube & Pipe Demo | Change Orders & Revisions - Vault, Inventor & AutoCAD | Authoring & Publishing Custom Content
What I have done in the past is just use the command ("-insert" ... ) and provide the DWG name.
As long as the DWG is in the library and icon menu path, and/or the support file search path, it should work.
Hope this helps.