Tsk class

Represents properties of Task object.

public static class Tsk


static readonly ActivityIdRepresents activity id field - a task’s unique identifier used by Primavera. (only applicable to Primavera projects).
static readonly ActualCostCosts incurred for work already performed by resources on their tasks, together with any other recorded costs associated with the task.
static readonly ActualDurationThe span of actual working time for a task, based on the scheduled duration and current remaining work or percent complete.
static readonly ActualFinishThe date when a task was completed.
static readonly ActualOvertimeCostCosts incurred for overtime work already performed on tasks by assigned resources.
static readonly ActualOvertimeWorkThe actual amount of overtime work already performed by resources assigned to tasks.
static readonly ActualOvertimeWorkProtectedThe duration through which actual overtime work is protected.
static readonly ActualStartThe date and time that a task actually began.
static readonly ActualWorkThe amount of work that has already been done by resources assigned to tasks.
static readonly ActualWorkProtectedThe duration through which actual work is protected. Reading supported for XML format only.
static readonly ACWPCosts incurred for work already done on a task, up to the project status date or today’s date.
static readonly BCWPThe cumulative value of the task’s percent complete multiplied by the time phased baseline costs.
static readonly BCWSThe cumulative time phased baseline costs up to the status date or today’s date.
static readonly BudgetCostBudget costs for budget cost resources. Budget resources are assigned only to the project summary task.
static readonly BudgetWorkBudget work for budget work and material resources. Budget resources are assigned only to the project summary task.
static readonly CalendarThe task calendar.
static readonly CommitmentFinishThe finish date of a delivery. Reading supported for XML format only.
static readonly CommitmentStartThe start date of a delivery. Reading supported for XML format only.
static readonly CommitmentTypeDetermines whether a task has an associated delivery or a dependency on an associated delivery. Reading supported for XML format only.
static readonly ConstraintDateThe specific date associated with the constraint type.
static readonly ConstraintTypeProvides choices for the type of constraint that can be applied for scheduling a task.
static readonly ContactThe name of an individual responsible for a task.
static readonly CostThe total scheduled or projected cost for a task based on costs already incurred for work performed by resources assigned to the tasks, in addition to the costs planned for the remaining work.
static readonly CostVarianceThe difference between the baseline cost and total cost for a task, resource, or assignment.
static readonly CreatedThe date when a task was created.
static readonly CVThe difference between the baseline cost and total cost for a task. Cost Variance = Cost - Baseline Cost
static readonly DeadlineA target date that indicates when a task is to be completed.
static readonly DisplayAsSummaryDetermines whether the task should be displayed as a summary task. Reading supported for XML format only.
static readonly DisplayOnTimelineSpecifies whether a task should be displayed on a timeline view.
static readonly DurationThe total span of active working time for a task as entered or as calculated by Microsoft Project based on start date, finish date, calendars, and other scheduling factors.
static readonly DurationTextReturns the task’s duration text.
static readonly DurationVarianceThe difference between the baseline duration of a task and the total duration (current estimate) of a task.
static readonly EarlyFinishThe earliest date that a task could possibly finish, based on early finish dates of predecessor and successor tasks, other constraints, and any leveling delay.
static readonly EarlyStartThe earliest date that a task could possibly begin, based on the early start dates of predecessor and successor tasks and other constraints.
static readonly EarnedValueMethodDetermines whether the % Complete or Physical % Complete field should be used to calculate budgeted cost of work performed (BCWP).
static readonly ExternalIdIf a task is an external task it contains the task’s external Id.
static readonly ExternalTaskProjectThe source location and task identifier of an external task.
static readonly ExternalUidContains the external task’s Unique identifier when the task is external.
static readonly FinishThe scheduled finish date of a task.
static readonly FinishSlackTimeSpanThe duration between the Early Finish and Late Finish dates.
static readonly FinishTextReturns the task’s finish text.
static readonly FinishVarianceThe time that represents the difference between the baseline finish date of a task or assignment and its current finish date.
static readonly FixedCostShows any non resource task expense.
static readonly FixedCostAccrualDetermines choices for how and when fixed costs are to be charged, or accrued, to the cost of a task.
static readonly FreeSlackTimeSpanThe time that a task can be delayed without delaying any successor tasks.
static readonly GuidThe generated unique identification codes for a task.
static readonly HasOverallocatedResourceIndicates whether the task has an resource assigned which has more work on assigned tasks than can be completed within normal working capacity.
static readonly HideBarDetermines whether the Gantt bar of a task is hidden when displayed in Microsoft Project.
static readonly HyperlinkThe title or explanatory text for a hyperlink associated with a task.
static readonly HyperlinkAddressThe address for a hyperlink associated with a task.
static readonly HyperlinkSubAddressThe specific location in a document in a hyperlink associated with a task.
static readonly IdThe position identifier of a task within the list of tasks.
static readonly IgnoreResourceCalendarDetermines whether the scheduling of the task considers the calendars of the resources assigned to the task.
static readonly IgnoreWarningsIndicates whether to hide the schedule conflict warning indicator in Microsoft Project.
static readonly IsActiveDetermines whether a task is active. Inactive tasks no longer affect other tasks or the overall Project schedule.
static readonly IsCriticalDetermines whether a task is on the critical path.
static readonly IsEffortDrivenDetermines whether the scheduling for the task is effort-driven scheduling.
static readonly IsEstimatedDetermines whether a task is estimated.
static readonly IsExpandedDetermines whether a summary task is expanded or not in GanttChart view.
static readonly IsExternalTaskDetermines whether a task is external.
static readonly IsManualDetermines whether a task is manually scheduled.
static readonly IsMarkedShows whether a task is marked for further action or identification of some kind.
static readonly IsMilestoneDetermines whether a task is a milestone.
static readonly IsNullDetermines whether a task is a null task.
static readonly IsOverallocatedIndicates whether any of the assigned resources on a task is assigned to more work on the task than can be done withing the normal working capacity.
static readonly IsPublishedDetermines whether the current task should be published to Project Server with the rest of the project.
static readonly IsRecurringDetermines whether a task is part of a series of recurring tasks.
static readonly IsResumeValidDetermines whether a task can be resumed.
static readonly IsRollupDetermines whether information about the subtask Gantt bars will be rolled up to the summary task bar.
static readonly IsSubprojectDetermines whether a task is an inserted project.
static readonly IsSubprojectReadOnlyDetermines whether a subproject is read-only.
static readonly IsSummaryDetermines whether a task is a summary task.
static readonly LateFinishThe latest date that a task can finish without delaying the finish of the project.
static readonly LateStartThe latest date that a task can start without delaying the finish of the project.
static readonly LevelAssignmentsDetermines whether the leveling function can delay and split individual assignments in order to resolve over allocations.
static readonly LevelingCanSplitDetermines whether the resource leveling function can cause splits on remaining work on this task.
static readonly LevelingDelayThe time that a task is to be delayed from its early start date because of resource leveling.
static readonly ManualDurationDefines manually scheduled duration of a task.
static readonly ManualFinishDefines manually scheduled finish of a task.
static readonly ManualStartDefines manually scheduled start of a task.
static readonly NameA task’s name.
static readonly NotesRTFThe text notes in RTF format. Supported for MPP formats only.
static readonly NotesTextNotes’ plain text extracted from RTF data.
static readonly OutlineLevelThe outline level of a task.
static readonly OutlineNumberThe number that represents a task’s position in the hierarchical outline structure.
static readonly OvertimeCostThe total overtime cost for a task, for a resource on all assigned tasks, or for a resource assignment.
static readonly OvertimeWorkThe amount of overtime scheduled to be performed by all resources assigned to a task.
static readonly PercentCompleteThe current status of a task, expressed as the percentage of the task’s duration that has been completed.
static readonly PercentWorkCompleteThe current status of a task expressed as the percentage of work that has been completed.
static readonly PhysicalPercentCompletePercent complete value that can be be used as an alternative for calculating budgeted cost of work performed (BCWP).
static readonly PreleveledFinishThe finish date of a task as it was before resource leveling was done.
static readonly PreleveledStartThe start date of a task as it was before resource leveling was done.
static readonly PriorityThe level of importance given to a task, which in turn indicates how readily a task or assignment can be delayed or split during resource leveling.
static readonly RegularWorkThe total amount of non overtime work scheduled to be performed by resources.
static readonly RemainingCostThe remaining scheduled expense that will be incurred in completing the remaining scheduled work.
static readonly RemainingDurationThe time that is required to complete the unfinished part of a task.
static readonly RemainingOvertimeCostThe remaining scheduled overtime expense for a task.
static readonly RemainingOvertimeWorkThe amount of remaining scheduled overtime time.
static readonly RemainingWorkThe time still required to complete a task or set of tasks.
static readonly ResumeThe date that the remaining part of a task is scheduled to resume after entering any progress.
static readonly StartThe scheduled start date of a task.
static readonly StartSlackTimeSpanThe duration between the Early Start and Late Start dates.
static readonly StartTextReturns the task’s start text.
static readonly StartVarianceThe time that represents the difference between a baseline start date of a task or assignment and its currently scheduled start date.
static readonly StatusManagerThe name of the enterprise resource who is to receive status updates for the current task from resources.
static readonly StopThe date that represents the end of the actual portion of a task.
static readonly SubprojectNameThe source location of a subproject.
static readonly SVThe earned value schedule variance, through the project status date. Schedule variance (SV) is the difference between the BCWP and the BCWS.
static readonly TotalSlackTimeSpanThe time a task’s finish date can be delayed without delaying the project’s finish date.
static readonly TypeThe type of a task.
static readonly UidThe unique Id of a task.
static readonly WarningRepresents the flag which indicates that task has schedule discrepancies.
static readonly WBSWork breakdown structure (WBS) codes.
static readonly WBSLevelThe rightmost WBS level of a task.
static readonly WorkThe total time scheduled on a task for all assigned resources.
static readonly WorkVarianceThe difference between baseline work of a task and the currently scheduled work.


Shows how to read/write task properties.

var project = new Project();

// Add task and set task properties
var task = project.RootTask.Children.Add();
task.Set(Tsk.Name, "Task1");
task.Set(Tsk.Start, new DateTime(2020, 3, 31, 8, 0, 0));
task.Set(Tsk.Finish, new DateTime(2020, 3, 31, 17, 0, 0));

var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);

// Parse through all the collected tasks
foreach (var tsk in collector.Tasks)
    Console.WriteLine("Task Id: {0}", tsk.Get(Tsk.Id));
    Console.WriteLine("Task Uid: {0}", tsk.Get(Tsk.Uid));
    Console.WriteLine("Task Name: {0}", tsk.Get(Tsk.Name));
    Console.WriteLine("Task Start: {0}", tsk.Get(Tsk.Start));
    Console.WriteLine("Task Finish: {0}", tsk.Get(Tsk.Finish));

See Also