by Fenton Webb
If you are new to Plant3d, it’s tempting to quickly obtain project data directly from the Project.xml file.
The Project.xml file is an internal project file that should not really be used to extract Plant data. You should always use the API's because the XML file format can change from release to release.
Take, for instance, obtaining the list of P&ID drawings in AutoCAD P&ID. In 2011, you could
1) Read the Project.xml…
<ProjectPart name="PnId" fileName="C:\Fenton\Projects\PnID\Test ISO\PnIdPart.xml" relativeFileName="PnIdPart.xml" uncFileName="\\Fenton\Projects\PnID\Test ISO\PnIdPart.xml" />
2) Then Use the "relativeFileName" value to locate the "PnIdPart.xml" file.
3) Open the "PnIdPart.xml" file and search for the XML block named "<PnpDrawingFiles>"
4) Finally, inside the "<PnpDrawingFiles>" block, all the project drawing files are listed.
However, in P&ID 2013 these elements don’t exist anymore. This is because we had issues with multi-user support, so we moved the file list into the DCF.
The correct way to obtain a list of P&ID DWG files is to use the API
Autodesk.ProcessPower.ProjectManager.Project.GetPnPDrawingFiles()