Currently there is not a "batch export" of any sort for P&ID.
That would require some API programming starting with "Resave all project drawings", then opening each drawing one by one, executing the EXPORTTOAUTOCAD command, and finally inserting the path where the exported DWGs are going to.
I will submit this as a feature request to the product team.
Thank you for your response.
Have I interpreted correctly to assume that there is currently no API function to save a drawing to AutoCAD, and that this must be done through the "exportToAutocad" command?
Are there any API examples of opening / closing project drawings?
Correct, to save as a "regular" AutoCAD drawing (where the symbols are converted to standard blocks and the annotations converted to attributed blocks) the proper method is to open the drawing, save it, then you can right-click and use "Export to AutoCAD"
You can still open an AutoCAD P&ID DWG in regular AutoCAD, but the objects will be proxy objects and you won't be able to display all of the properties in the properties window. Exporting would allow someone with regular ACAD to view all the properties as attributes of the symbol and annotation blocks.
Also, exporting would be recommended method for final delivery where you wouldn't want someone to have the ability to bring that DWG right back into AutoCAD P&ID. It's essentially a "dumb" P&ID after exporting.
On batch exporting, I would recommend posting the question on one of the customization forums here:
If it can't be accomplished through Visual LISP or AutoLISP, I would say you would need the Plant 3D SDK (software development kit) along with Visual Basic or Visual C# in order to write code to perform this from within the API.
I have the Plant 3D SDK and would love to use a .Net solution to this problem. Unfortunately, I can't seem to find an API command to export the drawing to plain AutoCAD. Can you point me in the right direction?
check this post
Thanks for your reply.
I have managed to get the script solutions working, but I was hoping for an API solution to avoid having to open/close all the drawings in the editor.
Thanks to all who contributed to this post.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions to get help installing your software.
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.