Open XER File in Python

This short tutorial explains how to open XER file in Python. It includes details on setting up the IDE, a list of steps, and sample code for developing an XER file viewer in Python. Various properties of the main task and optional relevant Primavera properties are also discussed in this article.

Steps for XER Reader in Python

  1. Prepare the development environment by adding Aspose.Tasks for Python via .NET
  2. Set the license for the product to unlock all the features
  3. Load the source XER file into the Project class object
  4. Iterate through all the tasks and sub-tasks in the project
  5. Print each task’s properties as per the requirements
  6. Check if any task has the Primavera-specific properties
  7. Print all the Primavera properties such as activity ID, type, and various types of constraints in it

The given steps describe how to open XER file without Primavera in Python. Import the required library into the application, load the license, load the XER file into the Project object, and collect all the tasks recursively from it. Display the task properties, check the existence of the Primavera properties, and display the relevant properties, if found.

Code for XER Viewer in Python

This code demonstrates the development of a Primavera P6 XER viewer in Python. This library supports project-level Primavera metadata along with the task-level properties that can be accessed and displayed. You can display each task level in the project by using the outline_level value.

This article has taught us the process to read and print the XER file data. To convert an MPP file to HTML, refer to the article Convert MPP to HTML in Python.