Constraint Types for XER

Below are the Constraint Types present in an XER schedule:
Start on
Start on or after
Start on or before
Finish on
Finish on or after
Finish on or before
Mandatory start
Mandatory finish
As late as possible
None (as soon as possible)

How can I get these same Constraint types exported to Excel? Does Aspose convert these Constraint Types? How can I get these exact Constraint Types from my XER File?

@abhargava

Cause

To export the constraint types from an XER schedule to Excel using Aspose.Tasks, it is essential to ensure that the library is properly configured to read the XER file and that the export process accurately captures the constraint types.

Solution

Aspose.Tasks supports reading various project management formats, including XER, and allows you to export project data to Excel. The constraint types you mentioned (like “Start on”, “Finish on”, etc.) can be accessed through the task properties in the project object.

Code

Here’s a sample code snippet that demonstrates how to read an XER file and export the task constraints to an Excel file:

using Aspose.Tasks;
using Aspose.Tasks.Saving;

class Program
{
    static void Main()
    {
        // Load the XER file
        Project project = new Project("path/to/your/file.xer");

        // Create an Excel save options object
        var saveOptions = new XlsxOptions();

        // Save the project to Excel
        project.Save("output.xlsx", saveOptions);
    }
}

In this code, replace "path/to/your/file.xer" with the actual path to your XER file. The XlsxOptions will ensure that the project data, including tasks and their constraints, are saved in the Excel format.

Next Steps

  1. Run the provided code to export your XER file to Excel.
  2. Open the generated Excel file and check the task constraints to ensure they match your expectations.
  3. If you encounter any issues, verify that your XER file is correctly formatted and contains the expected constraint types.

If you need further assistance or have any questions, please feel free to ask!

I have tried it an it exports the data into some other format which matches more to MPP Constraint Types. How can I get exact XER Constraint Types?

@abhargava ,
Aspose.Tasks is based on MS Project’s API and support constraint types defined in
ConstraintType enum:
AsSoonAsPossible,
AsLateAsPossible,
MustStartOn,
MustFinishOn,
StartNoEarlierThan,
StartNoLaterThan,
FinishNoEarlierThan,
FinishNoLaterThan

The Primavera constraint types are mapped as follows:

Start on → ConstraintType.MustStartOn
Start on or after → ConstraintType.StartNoEarlierThan
Start on or before → ConstraintType.StartNoLaterThan
Finish on → ConstraintType.MustFinishOn
Finish on or after → ConstraintType.
Finish on or before → ConstraintType.FinishNoEarlierThan
Mandatory start → [Currently is not processed]
Mandatory finish → [Currently is not processed]
As late as possible → ConstraintType.AsLateAsPossible

The ‘Mandatory start’ and ‘Mandatory finish’ types are not processed in the current version.
We will address this issue in a future release.

@abhargava
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): TASKSNET-11509

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as TASKSNET-11509) have been fixed in this update.

Download link