Publishing Data from Command Line
- Last UpdatedJun 04, 2026
- 6 minute read
Grids, DB Views, drawings, datasheets and reports can be published from the command line.
Note: Starting version 1.4.2 of the gateway, publishing of datasheets from the command line is supported from AVEVA Engineering 15.7.1 to 15.7.3 onwards and publishing of drawings is supported from AVEVA Engineering 15.4 onwards.
For this, you must first create a token using AVEVA™ Administration. The token must contain the values for username, password and MDB. Then, the token path must be referred to in the command. For more information about tokens and how to create them, see the AVEVA Administration User Guide or see Generate Secure Login.
Note: You must ensure that the token contains the values for username, password and MDB. An error message is displayed if the token does not contain the values for these fields.
If you are using AVEVA's Licensing as a Service (LaaS) to license your product, you must export the data through the user interface at least once before exporting from the command line. When you export the data through the user interface using AVEVA's LaaS, you are prompted to provide your credentials. After the credentials are validated, you can export the data through the command line.
To export the data from the command line, you must either change to the installation folder of AVEVA™ Engineering using the cd command, or provide the full path of the installation location, and then run the following command:
AVEVA.Gateway.UE.Engineering.exe
The following parameters must be provided with the command:
Note: For more information about the optional parameters, see Specify Common Settings for Export and Publish Using User Interface. The values specified through command line override the values set in the configuration.
|
Parameter |
Required? |
Purpose |
|---|---|---|
|
-CfgNames |
Yes |
To specify the names of the configurations using which the export needs to be done. You can specify more than one configuration separated by a space. Example: "D6 D7" |
|
-DrawingProcessConnectedDrawings |
No |
Applicable only to drawings. Determines if all the connected drawings must be considered for publishing. By default, the value is set to False. |
|
-EIWMContext |
No |
To specify the context name. You can specify a nested context using the ‘+’ or '|' symbol. The highest context must be provided first. Example: "PARENT|CHILD" |
|
-EIWMFileSuffix |
No |
To specify the file suffix. |
|
-GenerateFolderVNETFIle |
No |
To specify if the physical SVG file needs to be added to the class and context in AVEVA™ Asset Information Management. By default, the value is set to True. |
|
-GenerateTriggerStartFile |
No |
To specify if the generated output files (EIWM and SVG) must be picked automatically for processing by AVEVA™ Asset Information Management. By default, the value is set to False. Note: If you set the value to True, make sure that the staging area of the output files is listed as a watch folder in the Import Controller. |
|
-GridProcessColumnsMode |
No |
Applicable only to grid data. Determines whether all or only grid visible (selected) columns of the grid must be considered for publishing. By default, the value is set to All. |
|
-GridProcessSubGrids |
No |
Applicable only to grids. Determines whether sub-grids of a published grid should also be published. Sub-grids are published only for elements that are associated with elements in the main grid, and only if the sub-grid has its Can be published (lstpub) flag enabled. By default, the value is set to False. |
|
-help |
No |
Displays the help. |
|
-ItemProcessDatasheets |
No |
To specify if all the datasheets related with the item must be considered for publishing. By default, the value is set to False. |
|
-ItemProcessDataSourceElements |
No |
To specify if all the data source elements related with the item must be considered for publishing. By default, the value is set to False. Note: This option is obsolete and Gateway will not run this argument. It removes the argument while running batch from Gateway for Unified Engineering 1.9 onwards. |
|
-ItemProcessDrawings |
No |
To specify if all the drawings related with the item must be considered for publishing. By default, the value is set to False. |
|
-ItemDataPublishScope |
No |
Controls how element data is collected and structured when publishing Grids or Database Views. |
|
-ItemProcessGrids |
No |
To specify if you want to include the object in the related grids in which the object selected for publishing is available. By default, this value is set to True. |
|
-SelectedElements |
Yes |
To specify the names/reference ids of the elements that need to be exported. More than one element can be separated by a space. Example: "=16392/2958 =24584/1259 =16392/4050" |
|
-SelectedGrids |
No |
To specify the grids to publish, by exact grid name (lstnam attribute) or by glob pattern matching the full grid hierarchy path. Multiple names and patterns can be provided separated by a space. A grid is published only if it exists and its lstpub (can be published) attribute is set to true. Glob patterns follow standard glob syntax; special characters in names must be escaped using []. Example: -SelectedGrids "Centrifugal_Pumps Mechanical/*" |
|
-TokenPath |
Yes |
To specify the location of the token that has been generated using AVEVA™ Administration. |
|
-SelectedReports |
No |
To specify the location of the report files (*.repv) that must be exported. This command considers the entire project as scope for reporting. Example: -SelectedReports "%%AVEVA_DESIGN_DFLTS%%data\reports\DESIGN-Pipe_List.repv" |
|
-SelectedScopedReports |
No |
To specify the location of the report files (*.repv) files that must be exported. This command considers the selected elements as scope for reporting. Example: -SelectedScopedReports "%%AVEVA_DESIGN_DFLTS%%data\reports\DESIGN-Equipment_List.repv" |
|
-AutoCfgUpgrade |
No |
To auto-upgrade the configuration that will be used for exporting. Example: -AutoUpgrade true |
An example command is as follows:
C:\AVEVA\Engineering15.3\AVEVA.Gateway.UE.Engineering.exe -proj AFP -TokenPath "C:\AVEVA\Token.AFP.mac" -SelectedElements " =16392/2958 =24584/1259 =16392/4050" -CfgNames "DefaultConfiguration" -EIWMFileSuffix "null" -EIWMContext "SRP+VPD " -GenerateFolderVNETFIle True -GenerateTriggerStartFile True
Unified Engineering :
ue -t:Engineeringgateway -args:-TokenPath "<C:\Users\XXX\Desktop\model Gateway output\New folder\token path\projectentry.mac>" -SelectedElements "=23997/1377" -CfgNames "A" -EIWMContext "avngate" -EIWMFileSuffix "avngate" -ItemProcessGrids "false" -ItemProcessDatasheets "false" -AutoCfgUpgrade "True" -GenerateTriggerStartFile "true" -GenerateFolderVNETFile "True"
Note: You can directly publish the database views of the existing grid and the below arguments can export db views as an output:
ue -t:Engineeringgateway -args:-TokenPath "C:\\projectentryUEAPS.mac" -SelectedElements "=23997/1331" -CfgNames "ds"-EIWMContext "avngate" -EIWMFileSuffix "avngate" -ItemProcessGrids "True" -ItemProcessDataSourceElements "true" -ItemProcessDatasheets "true" -AutoCfgUpgrade "True" -GenerateTriggerStartFile "true" -SelectedDbViews ":Centrifugalpump" -SelectedDbViews "Engineering - Branch" -SelectedDbViews "Engineering - Valves"
Note: Any errors about the export are added to the log file. The location of the log file is displayed on the screen. You can cancel the command line export using CTRL+C.
Example 1 Publish a specific grid by name
lstpub is true for Centrifugal_Pumps, false for Nozzles:
AVEVA.Gateway.UE.Engineering.exe -TokenPath "C:\AVEVA\Token.mac" -CfgNames "DefaultConfiguration" -SelectedGrids "Centrifugal_Pumps Nozzles"
Result: Centrifugal_Pumps is published; Nozzles is not published (lstpub is false).
Example 2 Publish all grids under a hierarchy category
Centrifugal_Pumps and Nozzles both have lstpub set to true and are under the Mechanical category:
AVEVA.Gateway.UE.Engineering.exe -TokenPath "C:\AVEVA\Token.mac" -CfgNames "DefaultConfiguration" -SelectedGrids "Mechanical/*"
Result: Centrifugal_Pumps and Nozzles are published.
Example 3 Publish all available grids
AVEVA.Gateway.UE.Engineering.exe -TokenPath "C:\AVEVA\Token.mac" -CfgNames "DefaultConfiguration" -SelectedGrids "**/*"
Result: All grids with lstpub set to true are published.
Example 4 Grid name contains special glob characters (escaping required)
Grid has been renamed to Centri*fugal/Pumps and lstpub is true:
-- This will NOT publish the grid (special characters not escaped):
-SelectedGrids "Centri*fugal/Pumps"
-- This WILL publish the grid (special characters escaped with []):
-SelectedGrids "Mechanical/Centri[*]fugal[/]Pumps"
Other Available Commands
The following table lists the other commands available for using the gateway.
|
Command |
Purpose |
|---|---|
|
AVEVA.Gateway.UE.Engineering.exe -TokenPath "<location of .mac file>" -CfgList |
To view the list of configurations available |
|
AVEVA.Gateway.UE.Engineering.exe -help |
To view the help for command line export |
Return Codes
The following table lists the return codes.
|
Return Code |
Description |
|---|---|
|
0 |
Success |
|
1 |
At least one error occurred during export process. Check log for details. |
|
12 |
"-CfgNames" given does not exist |
|
13 |
"-SelectedElements" is not given |
|
14 |
"-SelectedElements" given does not exist |
|
100 |
"-TokenPath" is not given |
|
101 |
Token file at "-TokenPath" does not exist |
|
102 |
Incorrect token |
Note: To view the exit code for an export operation, after the export is complete, type %errorlevel% at the command prompt. It may not be applicable to Unified Engineering application and it would work in .msi application of Engineering.