AutoCAD Architecture Customization

AutoCAD Architecture Customization

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

command line -mvpartadd via a toolbar button.

271 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,236
Registered: ‎03-13-2008
Message 2 of 2 (101 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!
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.