AutoCAD Architecture Customization

AutoCAD Architecture Customization

Reply
Valued Mentor
mdhutchinson
Posts: 2,293
Registered: ‎11-18-2003
Message 1 of 2 (265 Views)

command line -mvpartadd via a toolbar button.

265 Views, 1 Replies
01-11-2011 10:35 AM

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.

*Expert Elite*
Keith.Brown
Posts: 1,146
Registered: ‎03-13-2008
Message 2 of 2 (95 Views)

Re: command line -mvpartadd via a toolbar button.

10-08-2011 09:35 AM 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.


Keith Brown AutoCAD MEP BLOG | RSS Feed
AutoCAD MEP 2014 | Revit 2014 | EastCoast CAD/CAM V6.1 | Visual Studio 2013
────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate. Thank you!
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.