Using batch mode
Run export and import processes without starting the Windchill Requirements Connector user interface.
A valid roundtrip configuration with the following settings has to be pre-configured.
1. Export
a. Documents to be exported
b. Attributes to be exported
Figure 324. Roundtrip prepared for batch export operation
2. Import
a. Documents to be imported
b. Path where documents should be imported in the database
c. Attributes to be imported
Figure 325. Roundtrip prepared for batch import operation
3. Login
Login data has to be used for pre-configuring the export and import settings and can be reused during batch mode or overwritten by the batch mode
Figure 326. Login data
4. Windchill Requirements Connector
The application has to be closed before starting an export or import operation
This section describes how an export or import operation can be run without starting the Windchill Requirements Connector user interface. The batch mode can be used for an automatic execution e.g. via batch files or a Windows task.
* 
The batch mode does not replace the user interface. The configuration still needs to be created using the Windchill Requirements Connector user interface — only the execution can be done in batch mode.
The batch mode provides the following files:
IRCSyncExport.cmd — to run export processes
IRCSyncImport.cmd — to run import/update processes
PTCIntegrityRequirementsConnectorC.exe — logs to the command line output and is used by the *.cmd files mentioned above
1. Running an export operation:
a. Please open a command line window and navigate to your Windchill Requirements Connector install directory e.g.: C:\Program Files\PTC\Windchill Requirements Connector
b. Type the following command to execute an export operation IRCSyncExport.cmd —roundtrip:<PROJECT_NAME/ROUNTRIP_NAME.roundtrip> e.g. IRCSyncExport.cmd —roundtrip:Batch/Batch.roundtrip
Figure 327. Running batch export operation
The export operation will log the process to the command line interface. Any issue that might occur during the operation will also be logged:
Figure 328. Error log during operation
* 
This shows an example batch file for the export

@echo off
echo. >> batch_log.txt 2>>&1
echo. >> batch_log.txt 2>>&1

REM --------------------------------------------------
REM Use this section to log to the console
echo [%date%, %time%] Operation start
IRCSyncExport.cmd -roundtrip:"Batch/Batch.roundtrip"

REM --------------------------------------------------
REM Use this section to log into a file
REM echo [%date%, %time%] Operation start >> batch_log.txt 2>>&1
REM IRCSyncExport.cmd -roundtrip:"Batch/Batch.roundtrip" >> batch_log.txt 2>>&1
2. Running an import operation:
a. Please open a command line window and navigate to your Windchill Requirements Connector install directory e.g.: C:\Program Files\PTC\Windchill Requirements Connector
b. Type the following command to execute an export operation IRCSyncImport.cmd —roundtrip:<PROJECT_NAME/ROUNTRIP_NAME.roundtrip> —file:<PATH>/<FILE_NAME> e.g. IRCSyncImport.cmd —roundtrip:BatchImport/BatchImport.roundtrip —file:"E:\2016-02-25_09-42-37-750_export.reqifz"
* 
You can use wildcard characters as well to provide a list of files to the import process e.g.: -file:”E:\*.reqifz” or -file:”E:\2016–02–??_*.reqifz”
Figure 329. Running batch import operation
The import operation will log the process to the command line interface. Any issue that might occur during the operation will also be logged.
* 
This shows an example batch file for the import

@echo off
echo. >> batch_log.txt 2>>&1
echo. >> batch_log.txt 2>>&1

REM --------------------------------------------------
REM Use this section to log to the console
echo [%date%, %time%] Operation start
IRCSyncImport.cmd —roundtrip:"BatchImportILM/BatchImportILM.roundtrip"
—file:"E:\2016-02-25_09-42-37-750_export.reqifz"

REM --------------------------------------------------
REM Use this section to log into a file
REM echo [%date%, %time%] Operation start >> batch_log.txt 2>>&1
REM IRCSyncImport.cmd —roundtrip:"BatchImport/BatchImport.roundtrip"
REM —file:"E:\2016-02-25_09-42-37-750_export.reqifz" >> batch_log.txt 2>>&1
The batch operation will store every execution in the audit which can be checked with the user interface as usually:
Figure 330. Audit results of batch operation
The following table shows the additional options that can be used with the command line interface:
Common parameters:
Description:
-help|-?
Shows the possible options for the given *.cmd file
-data “path/to/workspace”
Path to workspace can be switched on startup of the operation e.g.: -data “C:\my_workspace”
-roundtrip|-r: ”Project/Configuration.roundtrip”
Roundtrip configuration to be used for the operation e.g.: -roundtrip:”Batch/Batch.roundtrip” (only one roundtrip configuration can be defined)
-import_project|-ip: “path/to/project”
Import project into workspace (the project must not be in the workspace already), several projects can be imported at once separated by ;
-executor|-e: “Max Mustermann”
Name of the executor that will be logged in the audit
-comment|-c: “A comment”
Comment that will be logged in the audit
-tool|-t: “IBM DOORS”, “Windchill RV&S”
Using this parameters the global login credentials specified in the preferences and referred to by the roundtrip configuration will not be used but the credentials specified in the roundtrip configuration itself. An error will be logged for the missing values (e.g. username, password) and the execution of the operation will be cancelled. The missing values have to be set via the corresponding parameters at startup
-step_time|-st: “time in ms”
Progress is shown on every operation. The display rate can be adjusted by setting the time in milliseconds e.g. -step_time:5000
Export parameters:
Description:
-format|-fo: “ReqIF 1.1”, “Rif 1.1a”
Requirements Interchange Format version that will be used for export
-suffix|-s: “_suffix”
Suffix that can be added to the export package name
Import parameters:
Description:
-file|-fi: “path/RequirementsFile.reqif”
File location to be used for import/update (*.zip, *.reqifz, *.rif files can also be used), several files can be added at once, already existing files (same name) will be overwritten
-select_attributes|-sa: true|false
new added attributes (not within the roundtrip configuration already) will be selected automatically for import
Windchill RV&S; specific parameters:
Description:
-host|-h: “hostname”
Specifies the hostname of the Windchill RV&S; database
-port|-p:7001
Port of the given database
-password|-pw:”password”
Password for the account login for the given database
-user|-u:”user”
User name for the account login for the given database
-ssl:true|false
Enable / disable SSL encryption (has to be configured on the specific database as well)
-truststore|-ts: “path/to/trust_store”
Path to trust store used for SSL encryption
-mapping_file|-m:”path/to/mapping_file”
Path to mapping file for Windchill RV&S; database mapping
DOORS specific parameters:
Description:
-host|-h: “hostname”
Specifies the hostname of the Windchill RV&S; database
-port|-p:36677
Port of the given database
-password|-pw:”password”
Password for the account login for the given database
-user|-u:”user”
User name for the account login for the given database
-client|-cl: “Doors 9.6”
Specifies client version to be used (in case more than one client is installed on the machine)
-pki:true|false
Enable / disable PKI encryption (has to be configured on the specific database as well)
-addins: “path/to/addins”
Path to additional addins that will be loaded before operation, several paths can be specified at once separated by ;
-attributeaddins: ”path/to/attributeaddins”
Path to additional attribute addins that will be loaded before operation, several paths can be specified at once separated by ;
-layouteaddins: ”path/to/layouteaddins”
Path to additional layout addins that will be loaded before operation, several paths can be specified at once separated by ;
-projectaddins: ”path/to/projectaddins”
Path to additional project addins that will be loaded before operation, several paths can be specified at once separated by ;
* 
When using batch files inside other batch scripts the call command has to be used e.g.: call IRCSyncExport.cmd
Was this helpful?