Using Batches for Import and Export in XML

You can import and export a model from or to an XML file by using batches.

This page discusses:

Import XML with a Batch

You can import an XML model by using the CATFLEditorImportBatch batch.

Run C:\Program Files\Dassault Systemes\BXXX\win_b64\code\bin\CATSTART.exe -run "CATFLEditorImportBatch config.xml and define the following inputs in the batch file:

Parameter Description Mandatory Example
<Repository> Enter PLM1. Yes
<Repository>PLM1</Repository>
<Server> Enter the name of the server. Yes
<Server> https://ve4al113plp.ux.dsone.3ds.com:443/3DSpace</server>
<UserName> Enter the user name. Yes
<UserName>XYH</UserName>
<Password> Enter the user password. Yes
<Password>MyMachinePassword</Password>
<LoginTicket> Enter the login ticket that allows you to connect temporarely in batch mode. For more information, see Installation and Setup > Configure > People & Organizations and Content > Login Tickets > Managing Login Tickets. Yes
<LoginTicket>RjM5NjhFQ0QyQUU4NDYwNDlBNEYzN0Q3QzY5QzYxMEN8eHlofHh5aHx8fDB8<\LoginTicket>
<Role> Enter the name of the role. Yes
<Role>VPLMProjectLeader.MyCompany.3DS Collab Space</Role>
<DataCreation> Enter one of the following options:
  • New_Data: imports as new data.
  • Update_Current_Revision: Updades existing data.
  • Incremental_Data: Updates existing data without deleting any components if from the following categories: FL instances, interfaces connection, ports and implement links.
    Note: Sheet, views and symbols placed in view are not supported.
Yes
<DataCreation>New_Data</DataCreation>

Example

A root function reference containing the following elements is saved in the database:

  • Function Instance 1
  • Function Instance 2

An XML file containing a root function reference with the following content is imported:

  • Function Instance 2
  • Function Instance 3
  • Function Instance 4

The result after the import will be as follows:

  • With Update_Current_Revision, the Function Instance 1 will be deleted from the root function reference. Only the imported content is kept.
  • With Incremental_Data, the existing content is kept and the imported new content is added.

<DuplicationStr> Enter a duplication string to define the naming of duplication file.

You can only define a duplication string if the Add New Data option is selected.

No
<DuplicationStr>_XYH</DuplicationStr>
<XmlPath> Enter the path of the imported .XML file. It must contains the name of the .XML file. Yes
<XmlPath>C:\temp\log00000001.xml</XmlPath>
<Image Path> Enter the Path to the Images folder, if any. No

About Errors Regarding the Creation of Objects

A file containing errors related to the creation of objects, is generated in the folder containing the imported XML file. The error file is named as follows: ImportedXMLFileName+Error.txt.

Example

<RFLP>
<Repository>PLM1</Repository>
<Server>https://ve4al113plp.ux.dsone.3ds.com:443/3DSpace</Server>
<UserName>XYH</UserName>
<Password>MyMachinePassword</Password>
<LoginTicket>RjM5NjhFQ0QyQUU4NDYwNDlBNEYzN0Q3QzY5QzYxMEN8eHlofHh5aHx8fDB8</LoginTicket>
<Role>VPLMProjectLeader.MyCompany.3DS Collab Space</Role>
<DataCreation>New_Data</DataCreation>
<DuplicationStr>_XYH</DuplicationStr>
<XMLPath>C:\temp\log00000001.xml</XMLPath>
</RFLP>

Export XML with a Batch

You can export an XML model by using the CATFLEditorExportBatch batch.

Run C:\Program Files\Dassault Systemes\BXXX\win_b64\code\bin\CATSTART.exe -run "CATFLEditorExportBatch config.xml and define the following inputs in the batch file:

Parameter Description Mandatory Example
<Repository> Enter PLM1. Yes
<Repository>PLM1</Repository>
<Server> Enter the name of the server. Yes
<Server>https://ve4al113plp.ux.dsone.3ds.com:443/3DSpace</Server>
<UserName> Enter the user name. Yes
<UserName>XYH</UserName>
<Password> Enter the user password. Yes
<Password>MyMachinePassword</Password>
<LoginTicket> Enter the login ticket that allows you to connect temporarily in batch mode. Installation and Setup > Configure > People & Organizations and Content > Login Tickets > Managing Login Tickets Yes
<LoginTicket>RjM5NjhFQ0QyQUU4NDYwNDlBNEYzN0Q3QzY5QzYxMEN8eHlofHh5aHx8fDB8</LoginTicket>
<Role> Enter the name of the role. Yes
<Role>VPLMProjectLeader.MyCompany.3DS Collab Space</Role>
<DumpImplementedEntities> Indicates if the implementing or implemented elements must be exported with the selected object. No
<DumpImplementedEntities>N</DumpImplementedEntities>
<Entity Type> Enter the name and the type of the root element. Yes
<Entity Revision="A.1" Type="RFLPLMFunctionalReference">fct-68731902-00000001</Entity>
<XmlPath> Enter the location of the exported .XML file Yes
<XMLPath>C:\temp</XMLPath>
<XML Name> Enter the name of the exported .XML file. Yes
log00000001

Example

<RFLP>
<Repository>PLM1</Repository>
<Server>https://ve4al113plp.ux.dsone.3ds.com:443/3DSpace</Server>
<UserName>XYH</UserName>
<Password>MyMachinePassword</Password>
<LoginTicket>RjM5NjhFQ0QyQUU4NDYwNDlBNEYzN0Q3QzY5QzYxMEN8eHlofHh5aHx8fDB8</LoginTicket>
<Role>VPLMProjectLeader.MyCompany.3DS Collab Space</Role>
<DumpImplementedEntities>N</DumpImplementedEntities>
<Entity Revision="A.1" Type="RFLPLMFunctionalReference">fct-68731902-00000001</Entity>
<XMLPath>C:\temp</XMLPath>
<XMLName>log00000001</XMLName>