Enum ConstraintType
Contents
[
Hide
]ConstraintType enumeration
Specifies the constraint on the start or finish date of a task.
public enum ConstraintType
Values
| Name | Value | Description |
|---|---|---|
| Undefined | -1 | The value was not defined in original project file. |
| AsSoonAsPossible | 0 | Start and Finish dates of Task are scheduled ASAP with respect to parent Start and Finish dates and considering TaskLinks. |
| AsLateAsPossible | 1 | Start and Finish dates of Task are scheduled ALAP with respect to parent Start and Finish dates and considering TaskLinks. |
| MustStartOn | 2 | Must Start On |
| MustFinishOn | 3 | Must Finish On |
| StartNoEarlierThan | 4 | Start No Earlier Than |
| StartNoLaterThan | 5 | Start No Later Than |
| FinishNoEarlierThan | 6 | Finish No Earlier Than |
| FinishNoLaterThan | 7 | Finish No Later Than |
Remarks
While exporting into XML the Undefined values will be eliminated from resulting XML.
Examples
Shows how to set constraint <see cref=“Aspose.Tasks.ConstraintType” /> ConstraintType.AsSoonAsPossible constraint for a task.
var project = new Project(DataDir + "Constraints/ConstraintAsLateAsPossible.mpp");
// Set constraint As Soon As Possible for task with Id 11
var task = project.RootTask.Children.GetById(11);
task.Set(Tsk.ConstraintType, ConstraintType.AsSoonAsPossible);
SaveOptions options = new PdfSaveOptions();
options.StartDate = project.Get(Prj.StartDate);
options.Timescale = Timescale.ThirdsOfMonths;
project.Save(OutDir + "AsSoonAsPossible_out.pdf", options);
See Also
- namespace Aspose.Tasks
- assembly Aspose.Tasks