You can use the Windows command line interface to export projects in XER format as a service.
To use the Windows command line interface to export projects as a service, do the following:
You can specify more than one action in a single file, by including multiple <action> nodes.
The following is a sample actions.xml file that drives the run of exporting one project. All tags must appear in the file; however, you can leave some tags empty, as noted below. Values in bold are literal values you must enter as shown. The other values are samples that will vary with your configuration.
<actions>
<action>
<type>export</type>
<Projects>
<ProjectID>Highway Project </ProjectID>
</Projects>
<outputFile>C:\HighwayProjectExport.xer</outputFile>
</action>
</actions>
Tag | Description |
---|---|
<type> | Required. The type of action to take. For project exporting, type is export. Note that export is case sensitive. |
<Project ID> | Required. Specify one or more valid project IDs. (Do not enter an EPS ID.) 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> |
<outputFile> | Required. Must be set to a valid path and filename, for example, to C:\HighwayProjectExport.xer. |
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.
PM.EXE /username=<name>
[/password=<name>]
[/alias=<name>] /actionScript=<path>
[/logfile=<path>]
Parameter | Description |
---|---|
/username=<name> | Required. The username to log in to P6 Professional. |
/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. |
/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 PrimaveraCmdLineLog.txt in the PM.exe application folder. |
For example:
PM.EXE /username=admin
[/password=admin] [/alias=PMDB]
/actionScript=actions.xml
[/logfile=c:\myLog.txt]
If any values include spaces, enclose the value in double quotes(").
If the export 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. |
1 | Invalid alias. |
2 | Invalid username or password. |
3 | XML file not found. |
4 | Invalid action type (you did not specify export). |
9 | Export action failure. |
214783647 | Unhandled exception, including invalid characters. |
If the command does not include all the required parameters, P6 Professional opens.
When connected to a P6 Professional database: See Financial periods dialog.
Legal Notices
Copyright © 1999, 2016,
Oracle and/or its affiliates. All rights reserved.
Last Published Wednesday, May 25, 2016