• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    AutoCAD P&ID

    Reply
    *Expert Elite*
    Rave.Tam
    Posts: 175
    Registered: ‎05-19-2011

    Silent ExportToAutoCAD command

    348 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
    Please use plain text.
    Active Member
    derek.jarvis
    Posts: 10
    Registered: ‎09-07-2011

    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?

    Please use plain text.
    Employee
    TomislavGolubovic
    Posts: 487
    Registered: ‎12-01-2010

    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.

    Please use plain text.
    Active Member
    derek.jarvis
    Posts: 10
    Registered: ‎09-07-2011

    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?

    Please use plain text.
    Employee
    TomislavGolubovic
    Posts: 487
    Registered: ‎12-01-2010

    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.

    Please use plain text.
    Active Member
    derek.jarvis
    Posts: 10
    Registered: ‎09-07-2011

    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.

    Please use plain text.
    Employee
    TomislavGolubovic
    Posts: 487
    Registered: ‎12-01-2010

    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.

    Please use plain text.
    Employee
    TomislavGolubovic
    Posts: 487
    Registered: ‎12-01-2010

    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.

    Please use plain text.
    Active Member
    derek.jarvis
    Posts: 10
    Registered: ‎09-07-2011

    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.

    Please use plain text.
    Employee
    TomislavGolubovic
    Posts: 487
    Registered: ‎12-01-2010

    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.

    Please use plain text.