> For the complete documentation index, see [llms.txt](https://help.auxalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.auxalia.com/plant-tools/plantreporter/how-to-use/command-line.md).

# Command line

This chapter describes how you start PlantReporter with command line parameters, e.g. to create reports automatically with a batch file or the Windows Task Scheduler. If you don't use PlantReporter this way, you can skip this chapter.

### <mark style="color:blue;">Program Files</mark>

PlantReporter is installed in the folder C:\Program Files\Autodesk\ApplicationPlugins\AqaPlantReporter.bundle\Contents\Windows. There you find three program files:

| Program file                                        | Use                                                                                                                                                                                                         |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PlantReporter.exe                                   | Starts one of the two programs below, depending on the AutoCAD version set in the Settings (see [AutoCAD Plant 3D](/plant-tools/plantreporter/settings/autocad-plant-3d.md)), and passes the parameters on. |
| PlantReporter.NetCore\PlantReporter.NetCore.exe     | PlantReporter for AutoCAD Plant 3D 2025 and newer.                                                                                                                                                          |
| PlantReporter.FrameWork\PlantReporter.FrameWork.exe | PlantReporter for AutoCAD Plant 3D 2022 to 2024.                                                                                                                                                            |

Remark: Only PlantReporter.NetCore.exe and PlantReporter.FrameWork.exe return the exit code (see below). PlantReporter.exe always returns 0. If a batch file or the Windows Task Scheduler should evaluate the result, call PlantReporter.NetCore.exe or PlantReporter.FrameWork.exe directly.

A command looks e.g. like this:

```
"C:\Program Files\Autodesk\ApplicationPlugins\AqaPlantReporter.bundle\Contents\Windows\PlantReporter.NetCore\PlantReporter.NetCore.exe" /PROJECT "C:\Projects\AUF-2345\Project.xml" /DWG "C:\Projects\AUF-2345\PID DWG\PID-0010.dwg,C:\Projects\AUF-2345\PID DWG\PID-0020.dwg" /CONFIG "PID Equipmentlist" /HIDDEN /QUIET
```

Not all parameters need to be used. Values with spaces must be enclosed in double quotes.

### <mark style="color:blue;">Project, Drawings and Report Configuration</mark>

**/PROJECT** sets the project from which the data are used. Give the complete path to the file Project.xml of the project. /PROJECT is always required when you use parameters.

**/DWG** sets one or more drawings from which the data are used. Give the complete path of each drawing and separate the drawings with a comma. The report then only contains the data of these drawings, like **Drawing Data** in the user interface.

**/FOLDER** sets one or more folders of the project and uses all drawings in them, including the sub folders. Separate the folders with a comma. Give the folder as a path in the project tree, e.g. "Area 100" or "Area 100\Pumps". Such a path is searched in the P\&ID and in the 3D drawings. To search only one of them, put PID or 3D in front, e.g. "PID\Area 100". The complete path of a folder within the project folder also works. You can combine /FOLDER with /DWG.

**/CONFIG** sets the report configuration which is used. Type in the name of the report configuration. The report configuration must already exist. If the name is not found, a message appears, also when /QUIET is used.

### <mark style="color:blue;">Run Mode</mark>

**/HIDDEN** starts PlantReporter without user interface. /PROJECT and /CONFIG must be set. PlantReporter prints or exports the report and closes automatically.

**/QUIET** suppresses all messages and the dialog with the created files. Use it for unattended runs, e.g. with the Windows Task Scheduler. Errors are still written to the log file under C:\ProgramData\ACPlant Consult\PlantTools\Log, and the exit code is returned.

**/PREVIEW** opens the report in the preview window instead of printing it. This also works with /HIDDEN.

Without /HIDDEN, PlantReporter opens with the given project, drawings and report configuration, and you continue in the user interface.

### <mark style="color:blue;">Versions and Revisions</mark>

These parameters only work together with /HIDDEN. Without /HIDDEN they are ignored. Versions/revisions must be activated for the project (see [Version/Revision](/plant-tools/plantreporter/settings/versionrevision.md)).

**/VERSION** creates a new version of the report. Type in the number, or AUTO to let PlantReporter calculate the next number according to the numbering of the configuration.

**/REVISION** creates a new revision of the report. The value works like with /VERSION.

Without /PRINT, PlantReporter only stores the version or revision and creates no file.

**/PRINT** prints or exports the report in the same run in which /VERSION or /REVISION creates the version or revision. So the new number is available in the export file path with \[REVTYPE1]\[REV1] (see [Adapt Target](/plant-tools/plantreporter/how-to-use/plantreporter/create-versionrevision/adapt-target.md)). Without /VERSION or /REVISION, /PRINT is ignored.

**/COMPARE** compares two existing versions or revisions and prints or exports the comparison report. Give the older one first and then the newer one. Each consists of V for version or R for revision, followed by the number exactly as it was created, e.g. V1, RA or V001.

Remark: /VERSION, /REVISION, /COMPARE and /PREVIEW cannot be combined. Versions and revisions for single drawings or folders can only be created in the user interface.

The following parameters set the options of the comparison. They only work together with /COMPARE. At least one /SHOW: parameter is required. Without it PlantReporter compares nothing and creates no file. The /SHOW: parameters can be combined.

| Parameter            | Option in the dialog                             | Default on the command line |
| -------------------- | ------------------------------------------------ | --------------------------- |
| /SHOW:NOCHANGES      | Show all without changes                         | off                         |
| /SHOW:CHANGES        | Show only changes                                | off                         |
| /SHOW:ADDITIONS      | Show only added                                  | off                         |
| /SHOW:DELETIONS      | Show only deleted                                | off                         |
| /FIELDS:REPORT       | Only Fields used in report layout                | yes                         |
| /FIELDS:QUERY        | All Fields used in report query                  |                             |
| /VALUES:OLDANDNEW    | Show old and new Values                          | yes                         |
| /VALUES:NEWONLY      | Show only new Values                             |                             |
| /VALUES:OLDONLY      | Show only old Values                             |                             |
| /DELIMITER:value     | Delimiter:                                       | , (comma)                   |
| /DELIMITER:LINEBREAK | Line Break                                       | off                         |
| /PREFIXNEW:value     | Prefix new Value:                                | New:                        |
| /PREFIXOLD:value     | Prefix old Value:                                | Old:                        |
| /SUFFIXNEW:value     | Suffix new Value:                                | empty                       |
| /SUFFIXOLD:value     | Suffix old Value:                                | empty                       |
| /COLORS              | Use colors to indicate differences in the report | off                         |

Replace value with your text directly after the colon. If the text contains spaces, enclose the complete parameter in double quotes, e.g. "/PREFIXNEW:New value: ". /COLORS uses the colors of the configuration (see [Version/Revision](/plant-tools/plantreporter/settings/versionrevision.md)).

The comparison is described under [Compare Versions/Revisions](/plant-tools/plantreporter/how-to-use/plantreporter/compare-versionsrevisions.md).

### <mark style="color:blue;">Examples</mark>

Create the next revision of the "PID Equipmentlist" and export the report in the same run:

```
"C:\Program Files\Autodesk\ApplicationPlugins\AqaPlantReporter.bundle\Contents\Windows\PlantReporter.NetCore\PlantReporter.NetCore.exe" /PROJECT "C:\Projects\AUF-2345\Project.xml" /CONFIG "PID Equipmentlist" /REVISION AUTO /PRINT /HIDDEN /QUIET
```

Compare revision A with revision B, show changed, added and deleted objects with colors and the old and new values in separate lines:

```
"C:\Program Files\Autodesk\ApplicationPlugins\AqaPlantReporter.bundle\Contents\Windows\PlantReporter.NetCore\PlantReporter.NetCore.exe" /PROJECT "C:\Projects\AUF-2345\Project.xml" /CONFIG "PID Equipmentlist" /COMPARE RA RB /SHOW:CHANGES /SHOW:ADDITIONS /SHOW:DELETIONS /DELIMITER:LINEBREAK /COLORS /HIDDEN /QUIET
```

Create the "PID Valvelist" for all P\&ID drawings of the folder "Area 100":

```
"C:\Program Files\Autodesk\ApplicationPlugins\AqaPlantReporter.bundle\Contents\Windows\PlantReporter.NetCore\PlantReporter.NetCore.exe" /PROJECT "C:\Projects\AUF-2345\Project.xml" /FOLDER "PID\Area 100" /CONFIG "PID Valvelist" /HIDDEN /QUIET
```

### <mark style="color:blue;">Exit Codes</mark>

PlantReporter.NetCore.exe and PlantReporter.FrameWork.exe return the following exit codes:

| Code | Meaning                                                                                                                                                                                                                                                                        |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 0    | Success                                                                                                                                                                                                                                                                        |
| -1   | Invalid command line parameter, /PROJECT is missing, or /CONFIG is missing with /HIDDEN                                                                                                                                                                                        |
| -2   | Settings could not be loaded                                                                                                                                                                                                                                                   |
| -3   | The project could not be opened (invalid project file)                                                                                                                                                                                                                         |
| -4   | The report configuration (/CONFIG) was not found or could not be loaded                                                                                                                                                                                                        |
| -5   | Preview failure                                                                                                                                                                                                                                                                |
| -6   | Print or export failure                                                                                                                                                                                                                                                        |
| -7   | A drawing given with /DWG is not part of the project                                                                                                                                                                                                                           |
| -8   | No valid license                                                                                                                                                                                                                                                               |
| -9   | /VERSION, /REVISION or /COMPARE could not be executed, e.g. value missing or invalid, number already exists, version or revision not found, versions/revisions not activated, parameters combined which cannot be combined, or the ACProject.db is checked out by another user |
| -10  | A folder given with /FOLDER doesn't exist in the project or contains no drawings                                                                                                                                                                                               |
