GUI - Import/Export Functionality

<< Click to Display Table of Contents >>

Navigation:  PipeLay > Software Introduction > GUI Basics >

GUI - Import/Export Functionality

Previous page Next page

The PipeLay Export/Import operation allows you to export or import a PipeLay model to/from a Plain Text or XML file. This functionality will facilitate easier automation of model generation as these files can be modified using external scripting languages. Its use is outlined in the following sections:

'Operation' describes how to Export/Import a Project file via the PipeLay Menu button or command line.

'Syntax' describes the syntax of the Plain Text/XML Project files.

'Automation' describes how the Plain Text or XML Project files can be modified to automate model building.

'Python' gives a brief description of the programming language used in the example script.

 

Operation

The Export/Import function can be accessed from the PipeLay Start Menu as shown in the figure below. Once you have a suitable base model configuration it can be exported from the PipeLay start menu by selecting Export/Import and selecting the required file format and then saving to a folder location of choice. The Status window in the PipeLay User Interface will echo the location of the export file, and a list of exported components if the export was successful. The two formats of the exported file will have Value specifications for example a coordinate or material entry value. These value entries can be changed in the Plain Text or XML files and re-imported into PipeLay. A modified Plain Text or XML file can be imported by following the same procedure as above.

 

PipeLay Start Menu - Export/Import

PipeLay Start Menu - Export/Import

 

PipeLay also has the ability to export and import a project from the command line. These commands launch, then automatically exit PipeLay when completed. They can be used in combination with the other PipeLay command line options to fully automate large analysis runs using external scripting languages such as Python.

To import an XML or text file that has been previously exported, use the command-line switch /IMPORT=filename

“C:\Program Files (x86)\Wood Group\PipeLay\bin\pplstd.exe” /IMPORT="C:\Examples\ Example 1 - Normal S-Lay \Example 1 - Normal S-Lay.xml"

This command automatically saves the newly created project file in the same folder as the .XML file as "Example 1 - Normal S-Lay.ppd"

If however, you wish to give the file a different name, add the /SAVEAS=filename command to the command-line as follows

“C:\Program Files (x86)\Wood Group\PipeLay\bin\pplstd.exe” /IMPORT="C:\Examples\ Example 1 - Normal S-Lay \Example 1 - Normal S-Lay.xml" /SAVEAS="C:\Examples\Imported File.ppd"

To export a file from a project file to either XML or text, add the /EXPORT=TEXT or /EXPORT=XML. To export as XML, use the following syntax

“C:\Program Files (x86)\Wood Group\PipeLay\bin\pplstd.exe”  “C:\Examples\ Example 1 - Normal S-Lay \Example 1 - Normal S-Lay.ppd" /EXPORT=XML

This generates an XML with the same name and in the same directory as the PPD, so in the example above, the file would be exported as "Example 1 - Normal S-Lay.xml"

As with the import command, /SAVEAS=filename can be used to explicitly specify the output file.

“C:\Program Files (x86)\Wood Group\PipeLay\bin\pplstd.exe”  “C:\Examples\ Example 1 - Normal S-Lay \Example 1 - Normal S-Lay.ppd" /EXPORT=TEXT /SAVEAS=c:\Examples\TextExport.txt

Note: Both the import and export command-line options will overwrite existing files without any warning.