Run the Gateway from the Command Line
- Last UpdatedJul 02, 2025
- 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 2D Data\Logs\2DDataGateway_Log_<GUID>.txt
The logs during project execution are logged separately to the log folder as defined by you either from 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 2D Data\AVEVA.NET.Gateways.2DData.exe" <-cp> <-in> <-op> <-lp> <-extcp> <-trnsfcp> <-ldrcp> <-context> <-upgradedProjectLocation> <-vf> <-vsviewports style:resolution> <-vsblock name:imageLocation> <-VSHATCH inputFillPattern:maxScale:outputFillPattern>
where the parameters are listed as follows:
|
Command Line Parameter |
Description |
|---|---|
|
Common Parameters |
|
|
-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. |
|
-op <output folder path> |
(optional) Output folder path for all the the output EIWM/SVG/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. Specify any number of manifest attributes with this syntax through the command line. Note: Refer to Appendix H: Handling of System Attributes for the list of attributes that cannot be changed. |
|
-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 AC2D |
|
|
-vf <viewFilter> |
(optional) Layout selection filter. See Layout Selection filter syntax in Section 4.3.2. |
|
-vsviewports style:resolution <Viewport style> |
'style' values: mixed, wireframe, raster 'resolution' values (optional, default = 1): 0.1 - 10 short param name: -VSV |
|
-VSBLOCK name:imageLocation <Block style> |
'name' value: block name 'imageLocation' value: image location that replaces block graphics short param name: -VSB |
|
Parameters Related to AC2D and MS2D |
|
|
-VSHATCH inputFillPattern:maxScale:outputFillPattern <Hatches Style> |
inputFillPattern value: hatch name maxScale value: hatch scale property outputFillPattern value: only 'SOLID' available short param name: -VSH |
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 2D Data \AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.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 2D Data\\AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.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 project context: "C:\Program Files\AVEVA\AVEVA NET Gateways\Gateway For 2D Data\AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.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 2D Data\AVEVA.NET.Gateways.2DData.exe" -cp "c:\GCTproject\GCTproject.xml" -upgradedprojectlocation "C:\UpgradedProject"
Viewports Style:
Example 1: -vsviewports mixed:0.5
Example 2: -vsv wireframe
Example 3: -vsv raster:5
Block Style:
Example 1: -vsblock "companyLogo1":"c:\logo1.png" -vsblock "companyLogo2":"c:\logo2.png"
Example 1: -vsb "companyLogo.*":"c:\logo.png"
Hatches style:
Example 1: -vshatch DOTS:0.01:SOLID -vshatch AR-CONC:999:SOLID
Example 2: -vsh AR-CONC:0.1:SOLID
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.2DData.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 SVG 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.