Run the Gateway from the Command Line
- Last UpdatedDec 10, 2024
- 5 minute read
You can run the Gateway from the command line.
Note: When you run the Gateway from command prompt, all processing messages are directed to the log file. This allows you to use the command line in batch mode and without waiting for the Gateway to complete the execution.
All the logs before project execution (such as command line parameters validation logs or project configuration file load logs) are logged into the default log location:
c:\Users\<username>\AppData\Roaming\AVEVA\AVEVA™ Gateway for 3D Data\Logs\ThreeDData_Log_<GUID>.txt
The logs during project execution are logged separately to the log folder as defined by you either om command prompt or in the configuration file.
Note: A log file is generated for each .DWG or .DXF file.
At the command line, type the following:
"C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" <-cp> <-in> <-xglin> <-pcfin> <-op> <-lp> <-extcp> <-trnsfcp> <-ldrcp> <-context> <-ma> <-ma> <-upgradedProjectLocation>
where the parameters are listed as follows:
|
Command Line Parameter |
Description |
|---|---|
|
-cp <project configuration file path> |
(mandatory) Project configuration file path, for example, "C:\Doc Gateway Training\Example Config.xml". |
|
-in <input file/folder path> |
(optional) Input file/folder path for the input files. Note: This option cannot be used to select the input present in S3 bucket or in ACS. The -in parameter is only applicable for AC3D, NWD and IFC. |
|
-op <output folder path> |
(optional) Output folder path for all the the output EIWM/XGL/CSV files. |
|
-lp <log folder path> |
(optional) Log folder path. |
|
-extcp <configuration file path for Extract configuration> |
(optional) Configuration file path of Extract configuration. |
|
-trnsfcp <configuration file path for Transform configuration> |
(optional) Configuration file path of Transform configuration. |
|
-ldrcp <configuration file path for Load configuration> |
(optional) Configuration file path of Load configuration. |
|
-ma "<manifest attribute name1>:<manifest attribute value1>" |
(optional) Allows the passing of a manifest attribute value from the command line. You can specify any number of manifest attributes with this syntax through command line. |
|
-ma <manifest attribute name2>:<manifest attribute value2> |
(optional) Allows the passing of a manifest attribute value from the command line. |
|
-context <project context> |
(optional) Sets the context for EIWM objects. |
|
-upgradedProjectLocation <folder path for upgraded Gateway Configuration Tool project> |
(optional) Sets the new folder location for the upgraded Gateway Configuration Tool project. |
|
Parameters Related to PCF |
|
|
-xglin <XGL input file/folder path/S3 file URL> |
(optional) Input file/folder path for the XGL file. You can use URL to S3 File or Directory. It works only when Extract configuration is set to handle S3 Bucket as Input Source. See Extract Settings for details. |
|
-pcfin <PCF input folder/file path> |
(optional) Input file/folder path for the PCF files. |
Notes:
-
Any optional parameter used at the command line takes priority over the equivalent configuration in the project configuration file. This is done without overwriting the value in project configuration file.
-
The Gateway validates the command line syntax and the contents of configuration files. If any errors are detected, processing will be terminated and the relevant message will be displayed on the console.
Examples:
With only project configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml"
With project configuration file and input folder: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -in "D:\Test\New_2\Input" Takes Input source files from command line parameter "D:\Test\New_2\Input"
With project configuration file and output folder: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -op "D:\Test\New_2\Output" Generates output in the Output Path provided from command line "D:\Test\New_2\Output"
With project configuration file and logs folder: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -op "D:\Test\Logs" Generates logs in the Logs Path provided from command line "D:\Test\Logs"
With project configuration file and Extract configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -extcp "D:\Test\New_2\Configurations\ExtractorConfiguration.xml" Takes Extractor Configuration file from command line parameter "D:\Test\New_1\New_1.xml" -extcp "D: \Test\New_2\Configurations\ExtractorConfiguration.xml"
With project configuration file and Transform configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -trnsfcp "D:\Test\New_2\Configurations\TransformerConfiguration.xml" Takes Transformer Configuration file from command line parameter "D:\Test\New_1\New_1.xml" -extcp "D: \Test\New_2\Configurations\TransformerConfiguration.xml"
With project configuration file and Load configuration file: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -ldrcp "D:\Test\New_2\Configurations\LoaderConfiguration.xml" Takes Loader Configuration file from command line parameter "D:\Test\New_1\New_1.xml" -extcp "D:\Test\New_2\Configurations\LoaderConfiguration.xml"
With project configuration file and input folders specific for PCF Gateway:
C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -pcfin "D:\Test\New_2\InputPCF" -xglin "D:\Test\New_2\InputXGL" Takes Input source files for PCF Gateway from command line parameters: "D:\Test\New_2\InputPCF" and "D:\Test\New_2\InputXGL
With project configuration file and project context: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -context "XXX|YYY|ZZZ" updates context in EIWM output file from command line parameter "XXX|YYY|ZZZ"
With project configuration file and manifest attributes: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "D:\Test\New_1\New_1.xml" -ma "#MODEL_NAME#:My Output"
With Gateway Configuration Tool project configuration file and output folder for upgraded project: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 3D Data\AVEVA.NET.Gateways.Data3D.exe" -cp "c:\GCTproject\GCTproject.xml" -upgradedprojectlocation "C:\UpgradedProject"
Notes:
-
You need to fill all mandatory fields in the configuration file, such as project name and project path.
-
If the project configuration file is incorrect, command line prompt throws an exception stopping the execution process.
Example:
Project paths, such as extractor config path, loader config path, transform config path, input path, log path and output path mentioned in the project configuration file must be valid. Otherwise, the execution of the configuration file stops.
Output path scenarios are as follows:
-
If you provide an output path in the command line, then the provided path is the final output path. If you do not provide any output path, then the output path mentioned in the config file is taken as the default output path.
-
If the output path provided by you is valid, then a check is conducted to determine whether the output path exists. If the output path does not exist, then a directory is created in that provided path and the output files are generated there.
-
If you provide an invalid output path format, then the command line shows an exception message showing the invalid output path.
-
Exit Codes:
The following command line exit codes are defined for AVEVA.NET.Gateways.Data3D.exe.
|
Exit Code |
Definition |
|
0 |
Success |
|
1 |
Gateway processing stopped because of general error |
|
3 |
Gateway processing canceled |
|
7 |
Processing failed in extractor |
|
9 |
Processing failed in transformer |
|
11 |
Processing failed in ZGL loader |
|
13 |
Processing failed in EIWM loader |
|
17 |
Processing failed due to no input files |
|
18 |
File processing stopped due to timeout |
|
19 |
Processing failed in CSV loader |
|
1000 |
Gateway processing failed |
Note: The exit code returned from the Gateway can be captured in the %errorlevel% variable when executed in batch mode.