Import Using PML
- Last UpdatedNov 22, 2022
- 1 minute read
It is possible to import P&IDs in non-graphics (tty) mode using PML. This enables batch scripts to execute imports without user interaction. For example:
-
Create a folder called TestImport in your PDMS (or Marine) installation folder.
-
Create a file in the TestImport folder called import.bat with the following contents:
..\PlantEngineering tty <project> <user>/<password> /<mdb> $M/import.mac
or
..\MarineEngineering tty <project> <user>/<password> /<mdb> $M/import.mac
-
Create a file in the TestImport folder called import.mac with the following contents:
SchematicModelManager
!pid = object smm()
!result = !pid.ImportFile('<P&ID filename and path>')
if (!result NE -1) then
savework
endif
finish
-
Run import.bat either from a command prompt or by double clicking on it from the file explorer.