Task
Contents
[
Hide
]Task class
Inherits: Aspose::Tasks::IEntityWithTd
Represents a task in a project.
The Task is representing a one atomic chunk of work.
One can use Task to plan a project by creating tasks and assign appropriate resources onto them. Tasks in a project are organized as a rooted hierarchical tree structure, with a root task and subtrees of children tasks.
To build a tree of tasks one can use a specialized collection Aspose::Tasks::TaskCollection by accessing Project::RootTask property e.g.:
Project project = new Project();
// add new tasks
Task task1 = project.RootTask.Children.Add(); // a parent task with empty name is added
Task childTask1 = task1.Children.Add("Child 1");
childTask1.Set(Tsk.Start, new DateTime(2020, 2, 12, 8, 0, 0))
childTask1.Set(Tsk.Duration, project.GetDuration(8, TimeUnitType.Hour));
childTask1.Set(Tsk.Finish, new DateTime(2020, 2, 12, 17, 0, 0));
Task childTask3 = task1.Children.Add("Child 3");
childTask3.Set(Tsk.Start, new DateTime(2020, 2, 13, 8, 0, 0))
childTask3.Set(Tsk.Duration, project.GetDuration(8, TimeUnitType.Hour));
childTask3.Set(Tsk.Finish, new DateTime(2020, 2, 13, 17, 0, 0));
Task childTask2 = task1.Children.Add("Child 2", 2); // inserts a task before the childTask3
childTask2.Set(Tsk.Start, new DateTime(2020, 2, 14, 8, 0, 0))
childTask2.Set(Tsk.Duration, project.GetDuration(8, TimeUnitType.Hour));
childTask2.Set(Tsk.Finish, new DateTime(2020, 2, 14, 17, 0, 0));
// save project in the one of available formats
project.Save("Filled project.xml", SaveFileFormat.MPP);
Methods
| Name | Description |
|---|---|
| Clone | Creates full copy of a task without subtasks. |
| Delete | Deletes a task from parent project tasks collection and all its assignments. |
| Equals (2 overloads) | Returns a value indicating whether this instance is equal to a specified object. |
| Get | Returns the value to which the property is mapped in this container. |
| get_ActivityId | Represents activity id field - a task’s unique identifier used by Primavera. (only applicable to Primavera projects). |
| get_ActualCost | Gets a value of ActualCost. |
| get_ActualDuration | Gets a value of ActualDuration. |
| get_ActualFinish | Gets a value of ActualFinish. |
| get_ActualOvertimeCost | Gets a value of ActualOvertimeCost. |
| get_ActualOvertimeWork | Gets a value of ActualOvertimeWork. |
| get_ActualOvertimeWorkProtected | Gets a value of ActualOvertimeWorkProtected. |
| get_ActualStart | Gets a value of ActualStart. |
| get_ActualWork | Gets a value of ActualWork. |
| get_ActualWorkProtected | Gets a value of ActualWorkProtected. |
| get_ACWP | Gets a value of ACWP. |
| get_Assignments | Gets a collection of resource assignments for this object. |
| get_Baselines | Gets the collection of baseline values of the task. |
| get_BCWP | Gets a value of BCWP. |
| get_BCWS | Gets a value of BCWS. |
| get_BudgetCost | Gets a value of BudgetCost. |
| get_BudgetWork | Gets a value of BudgetWork. |
| get_Calendar | Gets a value of Calendar . |
| get_Children | Gets a child task collection of this object. TaskCollection object which represents children tasks. |
| get_CommitmentFinish | Gets a value of CommitmentFinish. |
| get_CommitmentStart | Gets a value of CommitmentStart. |
| get_CommitmentType | Gets a value of CommitmentType. |
| get_ConstraintDate | Gets a value of ConstraintDate. |
| get_ConstraintType | Gets a value of ConstraintType. |
| get_Contact | Gets a value of Contact. |
| get_Cost | Gets a value of Cost. |
| get_CostVariance | Gets a value of CostVariance. |
| get_Created | Gets a value of Created. |
| get_CV | Gets a value of CV. |
| get_Deadline | Gets a value of Deadline. |
| get_DisplayAsSummary | Gets a value indicating whether DisplayAsSummary is set or not. |
| get_DisplayOnTimeline | Gets a value indicating whether DisplayOnTimeline is set or not. |
| get_Duration | Gets a value of Duration . |
| get_DurationFormat | Gets a value of DurationFormat. |
| get_DurationText | Gets a value of DurationText. |
| get_DurationVariance | Gets a value of DurationVariance. |
| get_EarlyFinish | Gets a value of EarlyFinish. |
| get_EarlyStart | Gets a value of EarlyStart. |
| get_EarnedValueMethod | Gets a value of EarnedValueMethod. |
| get_ExtendedAttributes | Gets ExtendedAttributeCollection object containing the values of an extended attribute. |
| get_ExternalId | Gets a value of ExternalId. |
| get_ExternalTaskProject | Gets a value of ExternalTaskProject. |
| get_ExternalUid | Gets or set the external task’s Unique identifier when the task is external. |
| get_Finish | Gets a value of Finish. |
| get_FinishSlack | Gets a value of FinishSlack. |
| get_FinishText | Gets a value of FinishText. |
| get_FinishVariance | Gets a value of FinishVariance. |
| get_FixedCost | Gets a value of FixedCost. |
| get_FixedCostAccrual | Gets a value of FixedCostAccrual. |
| get_FreeSlack | Gets a value of FreeSlack. |
| get_Guid | Gets a value of Guid. |
| get_HideBar | Gets a value indicating whether HideBar is set or not. |
| get_Hyperlink | Gets the title or explanatory text for a hyperlink associated with a task. |
| get_HyperlinkAddress | Gets the address for a hyperlink associated with a task. |
| get_HyperlinkSubAddress | Gets the specific location in a document in a hyperlink associated with a task. |
| get_Id | Gets a value of Id. |
| get_IgnoreResourceCalendar | Gets a value indicating whether IgnoreResourceCalendar is set or not. |
| get_IgnoreWarnings | Gets a value indicating whether IgnoreWarnings is set or not. |
| get_IsActive | Gets a value indicating whether IsActive is set or not. |
| get_IsCritical | Gets a value indicating whether IsCritical is set or not. |
| get_IsEffortDriven | Gets a value indicating whether IsEffortDriven is set or not. |
| get_IsEstimated | Gets a value indicating whether IsEstimated is set or not. |
| get_IsExpanded | Gets a value indicating whether IsExpanded is set or not. |
| get_IsExternalTask | Gets a value indicating whether IsExternalTask is set or not. |
| get_IsManual | Gets a value indicating whether IsManual is set or not. |
| get_IsMarked | Gets a value indicating whether IsMarked is set or not. |
| get_IsMilestone | Gets a value indicating whether IsMilestone is set or not. |
| get_IsNull | Gets a value indicating whether IsNull is set or not. |
| get_IsOverallocated | Gets a value indicating whether IsOverallocated is set or not. |
| get_IsPublished | Gets a value indicating whether IsPublished is set or not. |
| get_IsRecurring | Gets a value indicating whether IsRecurring is set or not. |
| get_IsResumeValid | Gets a value indicating whether IsResumeValid is set or not. |
| get_IsRollup | Gets a value indicating whether IsRollup is set or not. |
| get_IsSubproject | Gets a value indicating whether IsSubproject is set or not. |
| get_IsSubprojectReadOnly | Gets a value indicating whether IsSubprojectReadOnly is set or not. |
| get_IsSummary | Gets a value indicating whether IsSummary is set or not. |
| get_LateFinish | Gets a value of LateFinish. |
| get_LateStart | Gets a value of LateStart. |
| get_LevelAssignments | Gets a value indicating whether LevelAssignments is set or not. |
| get_LevelingCanSplit | Gets a value indicating whether LevelingCanSplit is set or not. |
| get_LevelingDelay | Gets a value of LevelingDelay. |
| get_ManualDuration | Gets a value of ManualDuration. |
| get_ManualFinish | Gets a value of ManualFinish. |
| get_ManualStart | Gets a value of ManualStart. |
| get_Name | Gets a value of Name. |
| get_NotesRTF | Gets a value of NotesRTF. |
| get_NotesText | Gets a value of NotesText. |
| get_OutlineCodes | Gets OutlineCodeCollection object. |
| get_OutlineLevel | Gets a value of OutlineLevel. |
| get_OutlineNumber | Gets a value of OutlineNumber. |
| get_OvertimeCost | Gets a value of OvertimeCost. |
| get_OvertimeWork | Gets a value of OvertimeWork. |
| get_ParentProject | Gets the parent project of a task. |
| get_ParentTask | Gets the parent task of a task. |
| get_PercentComplete | Gets a value of PercentComplete. |
| get_PercentWorkComplete | Gets a value of PercentWorkComplete. |
| get_PhysicalPercentComplete | Gets a value of PhysicalPercentComplete. |
| get_Predecessors | Gets a TaskCollection object which contains all predecessors of this Task object. |
| get_PreleveledFinish | Gets a value of PreleveledFinish. |
| get_PreleveledStart | Gets a value of PreleveledStart. |
| get_PrimaveraProperties | Gets an object containing Primavera-specific properties for a task read from Primavera file. |
| get_Priority | Gets a value of Priority. |
| get_RecurringInfo | Gets the instance of RecurringTaskInfo class for the task which is a recurring task; if the task is not a recurring one then returns null; |
| get_RegularWork | Gets a value of RegularWork. |
| get_RemainingCost | Gets a value of RemainingCost. |
| get_RemainingDuration | Gets a value of RemainingDuration. |
| get_RemainingOvertimeCost | Gets a value of RemainingOvertimeCost. |
| get_RemainingOvertimeWork | Gets a value of RemainingOvertimeWork. |
| get_RemainingWork | Gets a value of RemainingWork. |
| get_Resume | Gets a value of Resume. |
| get_SplitParts | Gets a SplitPart collection that represents the portions of a task. |
| get_Start | Gets a value of Start. |
| get_StartSlack | Gets a value of StartSlack. |
| get_StartText | Gets a value of StartText. |
| get_StartVariance | Gets a value of StartVariance. |
| get_Status | Gets task status. |
| get_StatusManager | Gets a value of StatusManager. |
| get_Stop | Gets a value of Stop. |
| get_SubprojectName | Gets a value of SubprojectName. |
| get_Successors | Gets a TaskCollection object which contains all successors of this Task object. |
| get_SV | The earned value schedule variance, through the project status date. Schedule variance (SV) is the difference between the BCWP and the BCWS. |
| get_TimephasedData | Gets a TimephasedDataCollection object of this task. The time phased data block associated with a task. |
| get_TotalSlack | Gets a value of TotalSlack. |
| get_Type | Gets a value of Type. |
| get_Uid | Gets a value of Uid. |
| get_Warning | Gets a value indicating whether Warning is set or not. |
| get_WBS | Gets a value of WBS. |
| get_WBSLevel | Gets a value of WBSLevel. |
| get_Work | Gets a value of Work. |
| get_WorkVariance | Gets a value of WorkVariance. |
| GetHashCode | Returns a hash code value for this Task . |
| GetTimephasedData (2 overloads) | Returns TimephasedDataCollection object with TimephasedData values within given start and end dates. |
| MoveToSibling (2 overloads) | Moves the current task at the same Outline Level before the specified task. If ParentProject.CalculationMode is None user should invoke Project.Recalculate() after using this method (It will reschedule all project tasks (start/finish dates, sets early/late dates) and calculate the dependent fields such as slacks, work and cost fields, outline levels). If ParentProject.CalculationMode is Manual the method will calculate only task id, outline level and outline numbers automatically. If ParentProject.CalculationMode is Automatic the method reschedules all project’s tasks automatically (start/finish dates, sets early/late dates, calculates slacks, work and cost fields, recalculates ids and outline levels). |
| OutlineIndent | Indents a task in the outline. |
| OutlineOutdent | Promotes a task in the outline. |
| SelectAllChildTasks | Recursively collects all child tasks of this task. |
| Set | Maps the specified property to the specified value in this container. |
| set_ActivityId | Represents activity id field - a task’s unique identifier used by Primavera. (only applicable to Primavera projects). |
| set_ActualCost | Sets a value of ActualCost. |
| set_ActualDuration | Sets a value of ActualDuration. |
| set_ActualFinish | Sets a value of ActualFinish. |
| set_ActualOvertimeCost | Sets a value of ActualOvertimeCost. |
| set_ActualOvertimeWork | Sets a value of ActualOvertimeWork. |
| set_ActualOvertimeWorkProtected | Sets a value of ActualOvertimeWorkProtected. |
| set_ActualStart | Sets a value of ActualStart. |
| set_ActualWork | Sets a value of ActualWork. |
| set_ActualWorkProtected | Sets a value of ActualWorkProtected. |
| set_ACWP | Sets a value of ACWP. |
| set_Baselines | Sets the collection of baseline values of the task. |
| set_BCWP | Sets a value of BCWP. |
| set_BCWS | Sets a value of BCWS. |
| set_BudgetCost | Sets a value of BudgetCost. |
| set_BudgetWork | Sets a value of BudgetWork. |
| set_Calendar | Sets a value of Calendar . |
| set_CommitmentFinish | Sets a value of CommitmentFinish. |
| set_CommitmentStart | Sets a value of CommitmentStart. |
| set_CommitmentType | Sets a value of CommitmentType. |
| set_ConstraintDate | Sets a value of ConstraintDate. |
| set_ConstraintType | Sets a value of ConstraintType. |
| set_Contact | Sets a value of Contact. |
| set_Cost | Sets a value of Cost. |
| set_CostVariance | Sets a value of CostVariance. |
| set_Created | Sets a value of Created. |
| set_CV | Sets a value of CV. |
| set_Deadline | Sets a value of Deadline. |
| set_DisplayAsSummary | Sets a value indicating whether DisplayAsSummary is set or not. |
| set_DisplayOnTimeline | Sets a value indicating whether DisplayOnTimeline is set or not. |
| set_Duration | Sets a value of Duration . |
| set_DurationFormat | Sets a value of DurationFormat. |
| set_DurationText | Sets a value of DurationText. |
| set_DurationVariance | Sets a value of DurationVariance. |
| set_EarlyFinish | Sets a value of EarlyFinish. |
| set_EarlyStart | Sets a value of EarlyStart. |
| set_EarnedValueMethod | Sets a value of EarnedValueMethod. |
| set_ExternalId | Sets a value of ExternalId. |
| set_ExternalTaskProject | Sets a value of ExternalTaskProject. |
| set_ExternalUid | Gets or set the external task’s Unique identifier when the task is external. |
| set_Finish | Sets a value of Finish. |
| set_FinishSlack | Sets a value of FinishSlack. |
| set_FinishText | Sets a value of FinishText. |
| set_FinishVariance | Sets a value of FinishVariance. |
| set_FixedCost | Sets a value of FixedCost. |
| set_FixedCostAccrual | Sets a value of FixedCostAccrual. |
| set_FreeSlack | Sets a value of FreeSlack. |
| set_Guid | Sets a value of Guid. |
| set_HideBar | Sets a value indicating whether HideBar is set or not. |
| set_Hyperlink | Sets the title or explanatory text for a hyperlink associated with a task. |
| set_HyperlinkAddress | Sets the address for a hyperlink associated with a task. |
| set_HyperlinkSubAddress | Sets the specific location in a document in a hyperlink associated with a task. |
| set_Id | Sets a value of Id. |
| set_IgnoreResourceCalendar | Sets a value indicating whether IgnoreResourceCalendar is set or not. |
| set_IgnoreWarnings | Sets a value indicating whether IgnoreWarnings is set or not. |
| set_IsActive | Sets a value indicating whether IsActive is set or not. |
| set_IsCritical | Sets a value indicating whether IsCritical is set or not. |
| set_IsEffortDriven | Sets a value indicating whether IsEffortDriven is set or not. |
| set_IsEstimated | Sets a value indicating whether IsEstimated is set or not. |
| set_IsExpanded | Sets a value indicating whether IsExpanded is set or not. |
| set_IsExternalTask | Sets a value indicating whether IsExternalTask is set or not. |
| set_IsManual | Sets a value indicating whether IsManual is set or not. |
| set_IsMarked | Sets a value indicating whether IsMarked is set or not. |
| set_IsMilestone | Sets a value indicating whether IsMilestone is set or not. |
| set_IsNull | Sets a value indicating whether IsNull is set or not. |
| set_IsOverallocated | Sets a value indicating whether IsOverallocated is set or not. |
| set_IsPublished | Sets a value indicating whether IsPublished is set or not. |
| set_IsRecurring | Sets a value indicating whether IsRecurring is set or not. |
| set_IsResumeValid | Sets a value indicating whether IsResumeValid is set or not. |
| set_IsRollup | Sets a value indicating whether IsRollup is set or not. |
| set_IsSubproject | Sets a value indicating whether IsSubproject is set or not. |
| set_IsSubprojectReadOnly | Sets a value indicating whether IsSubprojectReadOnly is set or not. |
| set_IsSummary | Sets a value indicating whether IsSummary is set or not. |
| set_LateFinish | Sets a value of LateFinish. |
| set_LateStart | Sets a value of LateStart. |
| set_LevelAssignments | Sets a value indicating whether LevelAssignments is set or not. |
| set_LevelingCanSplit | Sets a value indicating whether LevelingCanSplit is set or not. |
| set_LevelingDelay | Sets a value of LevelingDelay. |
| set_ManualDuration | Sets a value of ManualDuration. |
| set_ManualFinish | Sets a value of ManualFinish. |
| set_ManualStart | Sets a value of ManualStart. |
| set_Name | Sets a value of Name. |
| set_NotesRTF | Sets a value of NotesRTF. |
| set_NotesText | Sets a value of NotesText. |
| set_OutlineCodes | Sets OutlineCodeCollection object. |
| set_OutlineLevel | Sets a value of OutlineLevel. |
| set_OutlineNumber | Sets a value of OutlineNumber. |
| set_OvertimeCost | Sets a value of OvertimeCost. |
| set_OvertimeWork | Sets a value of OvertimeWork. |
| set_PercentComplete | Sets a value of PercentComplete. |
| set_PercentWorkComplete | Sets a value of PercentWorkComplete. |
| set_PhysicalPercentComplete | Sets a value of PhysicalPercentComplete. |
| set_PreleveledFinish | Sets a value of PreleveledFinish. |
| set_PreleveledStart | Sets a value of PreleveledStart. |
| set_Priority | Sets a value of Priority. |
| set_RegularWork | Sets a value of RegularWork. |
| set_RemainingCost | Sets a value of RemainingCost. |
| set_RemainingDuration | Sets a value of RemainingDuration. |
| set_RemainingOvertimeCost | Sets a value of RemainingOvertimeCost. |
| set_RemainingOvertimeWork | Sets a value of RemainingOvertimeWork. |
| set_RemainingWork | Sets a value of RemainingWork. |
| set_Resume | Sets a value of Resume. |
| set_Start | Sets a value of Start. |
| set_StartSlack | Sets a value of StartSlack. |
| set_StartText | Sets a value of StartText. |
| set_StartVariance | Sets a value of StartVariance. |
| set_StatusManager | Sets a value of StatusManager. |
| set_Stop | Sets a value of Stop. |
| set_SubprojectName | Sets a value of SubprojectName. |
| set_SV | The earned value schedule variance, through the project status date. Schedule variance (SV) is the difference between the BCWP and the BCWS. |
| set_TimephasedData | Sets a TimephasedDataCollection object of this task. The time phased data block associated with a task. |
| set_TotalSlack | Sets a value of TotalSlack. |
| set_Type | Sets a value of Type. |
| set_Uid | Sets a value of Uid. |
| set_Warning | Sets a value indicating whether Warning is set or not. |
| set_WBS | Sets a value of WBS. |
| set_WBSLevel | Sets a value of WBSLevel. |
| set_Work | Sets a value of Work. |
| set_WorkVariance | Sets a value of WorkVariance. |
| ToString | Returns short string representation of a task. The exact details of the representation are unspecified and subject to change. |