AutoCAD Architecture Customization

AutoCAD Architecture Customization

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

command line -mvpartadd via a toolbar button.

266 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,192
Registered: ‎03-13-2008
Message 2 of 2 (96 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
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!