AutoCAD Architecture Customization
Welcome to Autodesk’s AutoCAD Architecture Customization Forums. Share your knowledge, ask questions, and explore popular AutoCAD Architecture Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

command line -mvpartadd via a toolbar button.

1 REPLY 1
Reply
Message 1 of 2
mdhutchinson
455 Views, 1 Reply

command line -mvpartadd via a toolbar button.

I have an application to insert mvparts that utilizes the command line version of mvpartadd...

code snippet follows:

 

   (command "-mvpartadd")
   (command "type")
   (command "Custom")
   (command "Chapter")
   (command "PipeHangers")
   (command "" "Subtype")
   (command SubType "Part" Name)

 

this works fine...

 

However, I am wonderting if there is not a better way...

The problem with the above is that the command seems to need to follow the 'path' through the mvpart dialog just as if the dialog was open... there seems to be a kind of regen happening that seems un necessary.

Is there a better way to go to the wanted part without having to pause for each key word as if AutoCAD was having trouble locating the part.

 

I did the following

(vlax-dump-object (vlax-ename->vla-object (car (nentsel))) t)

and saw that there was a refereence to:

 

StyleName = "D811422A066D4911B5189EAF06E99E0EDA58AD27E2E646728668A5F0D86312A1"

 

I would assume this is the GUID location of the mvpart... is there a way to impliment this GUID to get to the part quicker than what the commandline version of mvpartadd does?

 

To speed up mvpartadd command to get tot he required part quicker is what I am looking for.

Tags (2)
1 REPLY 1
Message 2 of 2
Keith.Brown
in reply to: mdhutchinson

Have you figured this one out yet using lisp?  I know its possible using .net and the part GUID but would like to find a solution using lisp.  Thanks.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost