AutoCAD P&ID General Discussion

AutoCAD P&ID General Discussion

Reply
*Expert Elite*
Rave.Tam
Posts: 204
Registered: ‎05-19-2011
Message 1 of 13 (448 Views)

Silent ExportToAutoCAD command

448 Views, 12 Replies
11-03-2011 12:25 AM

I'm trying to write a script to batch export P&ID drawings to autocad and i use this command "-exporttoautocad".

 

However, this command will initiate the aec export to autocad command. If i run "exporttoautocad" one time (click cancel in the dialog box), close it ,and reenter "-exporttoautocad" command, it will work.

 

is there any way i can use the silent command directly? Running out of options here, we have around 100+ drawings in each project and its too time consuming to export one by one.

If my post answers your question, please click the "Accept as Solution" button.

Check out my blog http://lazcad.com
Active Member
derek.jarvis
Posts: 10
Registered: ‎09-07-2011
Message 2 of 13 (357 Views)

Re: Silent ExportToAutoCAD command

03-29-2012 05:10 PM in reply to: Rave.Tam

Sorry to resurrect an old post - but did you find a solution for this?

Employee
TomislavGolubovic
Posts: 537
Registered: ‎12-01-2010
Message 3 of 13 (354 Views)

Re: Silent ExportToAutoCAD command

03-29-2012 05:42 PM in reply to: derek.jarvis

-exporttoautocad works (in 2012), its all command line driven, is that what you are after?



Tomislav Golubovic
Plant Solutions Engineer
Autodesk Australia / New Zealand
Autodesk, Inc.

Active Member
derek.jarvis
Posts: 10
Registered: ‎09-07-2011
Message 4 of 13 (347 Views)

Re: Silent ExportToAutoCAD command

03-30-2012 02:19 PM in reply to: Rave.Tam

I had success with this command - but I am unable to write a batch script with it.

 

When I open drawings with the "open" command and a network path none of the project commands work. Is there a different command I can use that will have it recognize the project and allow me to ExportToAutocad?

Employee
TomislavGolubovic
Posts: 537
Registered: ‎12-01-2010
Message 5 of 13 (343 Views)

Re: Silent ExportToAutoCAD command

03-30-2012 03:09 PM in reply to: Rave.Tam
What kind of script? VBA, or AutoCAD?


Tomislav Golubovic
Plant Solutions Engineer
Autodesk Australia / New Zealand
Autodesk, Inc.

Active Member
derek.jarvis
Posts: 10
Registered: ‎09-07-2011
Message 6 of 13 (341 Views)

Re: Silent ExportToAutoCAD command

03-30-2012 03:15 PM in reply to: Rave.Tam

Either LISP or the .NET API would be fine for me.

Employee
TomislavGolubovic
Posts: 537
Registered: ‎12-01-2010
Message 7 of 13 (323 Views)

Re: Silent ExportToAutoCAD command

04-02-2012 05:40 PM in reply to: derek.jarvis

I know in VBA it would be pretty easy to loop through a directory and maybe do the ThisDrawing.SendCommand function?

 

I am yet to test and double check it works as I think it might



Tomislav Golubovic
Plant Solutions Engineer
Autodesk Australia / New Zealand
Autodesk, Inc.

Employee
TomislavGolubovic
Posts: 537
Registered: ‎12-01-2010
Message 8 of 13 (321 Views)

Re: Silent ExportToAutoCAD command

04-02-2012 05:51 PM in reply to: TomislavGolubovic

Just found a script I had written for this a while ago. Its a VBA script that you input a folder and what you what to append at the end of the filename, and it does a loop through that folder and exports them to plain vanilla autocad files.



Tomislav Golubovic
Plant Solutions Engineer
Autodesk Australia / New Zealand
Autodesk, Inc.

Active Member
derek.jarvis
Posts: 10
Registered: ‎09-07-2011
Message 9 of 13 (317 Views)

Re: Silent ExportToAutoCAD command

04-02-2012 10:56 PM in reply to: Rave.Tam

Can you share this script, or at least the snippet of how you opened the file? I've written .Net libraries before that could batch through drawings. But,  like I mentioned earlier in the post, if I open the drawing with the normal AutoCAD method, it does not have access to the P&ID commands.

Employee
TomislavGolubovic
Posts: 537
Registered: ‎12-01-2010
Message 10 of 13 (315 Views)

Re: Silent ExportToAutoCAD command

04-02-2012 11:04 PM in reply to: derek.jarvis

Yeah, you would have to run the scripts inside P3D (or P&ID).

 

I'll PM you



Tomislav Golubovic
Plant Solutions Engineer
Autodesk Australia / New Zealand
Autodesk, Inc.

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 to get help installing your software.

New AutoCAD P&ID Category!

The AutoCAD P&ID forum has moved into it's very own category page, and can no longer be found within the Additional Product Forums.