Command line interface for XMI Import/Export (XMI Import/Export)
XMI Import/Export has a command line interface that allows you to perform import and export operations through a Command Prompt window, Windows Run dialog or through a batch file. This is useful should you want to, for example, schedule a batch file to perform XMI imports or exports over night.
|
• You must run the command line from the Modeler Exe folder.
• To ensure that the spaces in the command line are in the correct places, copy the command line from this topic and then make the necessary changes for your environment.
|
Command line interface for exports
Run the XMI Import/Export command line from the Modeler Exe folder. If you have installed Modeler to the default location, the path of the Modeler Exe folder is as follows.
For 64-bit versions of Windows:
• C:\Program Files (x86)\PTC Integrity Modeler\Modeler\Exe
For 32-bit versions of Windows:
• C:\Program Files\PTC Integrity Modeler\Modeler\Exe
The syntax of the command line for performing an XMI export is as follows:
c:\windows\system32\java.exe -cp jacob.jar;StudioXMIExporter.jar;registry.jar;. -Djava.library.path=. XMIGUIExport -c [-m="<model reference>"] -f="<path and name of XMI file>"
Where:
• <model reference> - is the reference of the model that is being exported, as shown in Modeler on the General tab of a model's Property Pages. If you do not include this argument, the active Modeler model is exported. Note that the model reference is case sensitive.
• <path and name of XM file>I - is the path and name of the XMI file you want to create through the export.
• In the following example, a model named MyModel is exported to a file named Export1.xmi.
Example:
c:\windows\system32\java.exe -cp jacob.jar;StudioXMIExporter.jar;registry.jar;. -Djava.library.path=. XMIGUIExport -c -m="\\SQL\MyServer@MODELER\MyDatabase\MyModel\0" -f="C:\XMIExports\Export1.xmi"
Command line interface for imports
Run the XMI Import/Export command line from the Modeler Exe folder. If you have installed Modeler to the default location, the path of the Modeler Exe folder is as follows.
For 64-bit versions of Windows:
• C:\Program Files (x86)\PTC Integrity Modeler\Modeler\Exe
For 32-bit versions of Windows:
• C:\Program Files\PTC Integrity Modeler\Modeler\Exe
The syntax of the command line for performing an XMI import is as follows:
C:\windows\system32\java.exe -cp jacob.jar;studioxmiimporter.jar;registry.jar;. GUI.XMIGUIImport -c [-m="<model reference>"] -f="<path and name of XMI file>"
Where:
• <model reference> is the reference of the model into which the xmi file will be imported, as shown in Modeler on the General tab of a model's Property Pages. If you do not include this argument, the XMI file is imported to the active Modeler model. Note that the model reference is case sensitive.
• <path and name of XMI file> - is the path and name of the XMI file you want to import.
Example:
In the following example, a file named Export1.xmi is imported into a model named MyModel.
C:\windows\system32\java.exe -cp jacob.jar;studioxmiimporter.jar;registry.jar;. GUI.XMIGUIImport -c -m="\\SQL\MyServer@MODELER\MyDatabase\MyModel\0" -f="C:\XMIExports\Export1.xmi"