Publish Data from Command Line
- Last UpdatedOct 24, 2024
- 3 minute read
Data can also be published from the command line. 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 the gateway, 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 CONNECT credentials. After the credentials are validated, you can export the data through the command line.
To export the AVEVA™ Diagrams data using the command line, you must first change to the installation folder of AVEVA™ Diagrams using the cd command and then run the following command: AVEVA.UE.Gateway.Diagrams.exe
The following parameters must be provided with the command:
Note: For more information about the parameters, see Setting Common Export Options.
|
Parameter |
Required |
Function |
|---|---|---|
|
-TokenPath |
Yes |
To specify the location of the token that has been generated using AVEVA™ Administration |
|
-Proj |
Yes |
To specify the name of the project |
|
-SelectedElements |
Yes |
To specify the names or reference ids of the elements that need to be exported. More than one element can be separated by a space. |
|
-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 comma. |
|
-EIWMContext |
No |
To specify the context name. You can specify a nested context using the ‘+’ or '|' symbol. The highest context must be provided first. |
|
-EIWMFileSuffix |
No |
To specify the file suffix |
|
-GenerateCSVFile |
No |
To specify if a .csv file must be generated. By default, the value is set to false. |
|
-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. |
An example command is as follows:
AVEVA.UE.Gateway.Diagrams.exe -TokenPath "C:\Users\XYZ\Desktop\Login Token\projectentry.mac" -Proj "APS" -SelectedElements "/HVAC_Diagram" -CfgNames "DefaultConfiguration" -EIWMContext "SRP+VPD" -EIWMFileSuffix "null" -GenerateCSVFile False -GenerateFolderVNETFIle True -GenerateTriggerStartFile True
The following table lists the exit codes for command line export.
|
Exit Code |
Meaning |
|---|---|
|
0 |
Success |
|
1 |
At least one error occurred during export process. Check log for details. |
|
10 |
"-Proj" argument is not given |
|
11 |
"-Proj" argument points to non-existing project |
|
12 |
"-CfgNames" argument contains all non-existing configuration names |
|
13 |
"-SelectedElements" argument is not given |
|
14 |
"-SelectedElements" argument contains all non-existing elements |
|
100 |
"-TokenPath" argument is not given |
|
101 |
"-TokenPath" argument points to missing token file |
|
102 |
Given login token is incorrect |
Note: To view the exit code for an export operation, after the export is complete, type %errorlevel% at the command prompt.