You can use the Windows command line interface to run a P6 Visualizer report to output the TSLD or Gantt diagram to a printer or a file. You can also schedule automated runs of P6 Visualizer TSLD and Gantt reports jobs using a program like Windows Task Scheduler. The following is a sample actions.xml file that drives the run of one report. All tags must appear in the file; however, you can leave some tags empty, as noted below.
To use the Windows command line interface to run a report, do the following:
You can specify more than one action in a single file, by including multiple <action> nodes.
Values are samples that will vary with your configuration.
Important: Every tag in the XML file is case sensitive.
<actions>
<action>
<reportType>TSLDReport</reportType>
<reportCategory>Global</repostCategory>
<reportName>Global default TSLD</reportName>
<projects>
<projectId>EC00515</projectId>
<projectId>NRG00800</projectId>
</projects>
<outputType>ToPrinter</outputType>
<outputName>MyPrinterName</outputName>
</action>
</actions>
Tag | Description | Valid Values |
---|---|---|
<reportType> | Required. The type of P6 Visualizer report. | TSLDReport / GanttReport |
<reportCategory> | Required. The group name of report, Global, Project, or User. | Global / Project / User |
<reportName> | Required. The name of layout. | Any valid string name |
<projectId> | Required. Specify one or more valid project IDs. You can specify multiple project IDs by specifying a list of projects separately, each with a separate tag on its own line, such as shown below: <projectId>Highway Project </projectId> <projectId>RSCD</projectId> | Valid ProjectId |
<outputType> | Required. Must be set to ToPrinter or ToXPS. | ToPrinter / ToXPS |
<outputName> | Required. Must specify the printer name if "ToPrinter" is set for <outputType>. If "ToXPS" is set for <outputType>, must be set to a valid .xps path and filename, for example, to C:\HighwayProjectExport.xps. If the full path is not specified and just a file name like myfilename.xps is specified then the default location is the location of Primavera.Visualizer.exe.
Default location of Primavera.Visualizer.exe is: local drive\Program Files\Oracle\Primavera P6\P6 Professional\P6Tools, or on 64 bit operating system installations local drive\Program Files (x86)\Oracle\Primavera P6\P6 Professional\P6Tools |
|
Note:
If you include non-English characters in the actions.xml file, save the file as Unicode and use the XML encoding attribute to specify the language, prior to the <actions> tag. For example, to specify German or French encoding:
<?xml version="1.0" encoding="windows-1252"?>
If you are using a batch file, use the chcp command to specify the appropriate language encoding. See Microsoft.com for more internationalization details.
Primavera.Visualizer.EXE /username=<name>
[/password=<name>]
[/alias=<name>] /actionScript=<path>
[/logfile=<path>]
[/language=<Language>]
Parameter | Description |
---|---|
/username=<name> | Required. The username to log in to P6 Visualizer. |
/password=<name> | The password for the username, if there is one for the username. |
/alias=<name> | Optional. The name of an existing destination database alias. If you do not specify an alias, the most recently accessed alias is used. |
/actionScript=<path> | Required. The full path to the edited actions.xml file. You must include the file name. If missing, P6 Visualizer opens. |
/logfile=<path> | Optional. The full path for creating the log file that contains processing results. You must include the file name. If the logfile is not set, the default log file destination is PrimaveraVisualizerCmd.log in the User's Temp folder, for example %TEMP%. |
/language=<Language> | Optional. If missing option, it will take the currentLangauge in the PrmBootStrap.xml. Valid Values for Language include:
|
Notes:
=
sign./
.If the process runs successfully, then an exit code of 0 is returned; if any errors are logged to the log file, an exit code greater than 0 is issued, which indicates failure.
Processing results are written to the log file, or you can echo them to the command line interface. These are the possible results:
Code | Description |
---|---|
0 | Success. |
-5 | Missing Script File. |
-6 | Bad Script File. |
-7 | Login Failed. |
-8 | Alias Failed. |
If the command does not include the parameter/actionScript, P6 Visualizer opens.
Working with P6 Visualizer Reports
Legal Notices
Copyright © 1999, 2016,
Oracle and/or its affiliates. All rights reserved.
Last Published Tuesday, April 26, 2016