AsnKey

AsnKey enumeration

Represents a list of supported assignment fields.

public enum AsnKey : byte

Values

NameValueDescription
Guid0Represents the Guid (ResourceAssignment) field.
Uid1Represents the UID (ResourceAssignment) field.
Task2Represents the Task (ResourceAssignment) field.
Resource3Represents the Resource (ResourceAssignment) field.
PercentWorkComplete4Represents the PercentWorkComplete (ResourceAssignment) field.
ActualCost5Represents the ActualCost (ResourceAssignment) field.
ActualFinish6Represents the ActualFinish (ResourceAssignment) field.
ActualOvertimeCost7Represents the ActualOvertimeCost (ResourceAssignment) field.
ActualStart8Represents the ActualStart (ResourceAssignment) field.
ActualWork9Represents the ActualWork (ResourceAssignment) field.
ActualOvertimeWork10Represents the ActualOvertimeWork (ResourceAssignment) field.
ACWP11Represents the ACWP (ResourceAssignment) field.
Confirmed12Represents the Confirmed (ResourceAssignment) field.
Cost13Represents the Cost (ResourceAssignment) field.
CostRateTableType14Represents the CostRateTableType (ResourceAssignment) field.
CostVariance15Represents the CostVariance (ResourceAssignment) field.
CV16Represents the CV (ResourceAssignment) field.
Delay17Represents the Delay (ResourceAssignment) field.
Finish18Represents the Finish (ResourceAssignment) field.
FinishVariance19Represents the FinishVariance (ResourceAssignment) field.
Hyperlink20Represents the Hyperlink (ResourceAssignment) field.
HyperlinkAddress21Represents the HyperlinkAddress (ResourceAssignment) field.
HyperlinkSubAddress22Represents the HyperlinkSubAddress (ResourceAssignment) field.
WorkVariance23Represents the WorkVariance (ResourceAssignment) field.
HasFixedRateUnits24Represents the HasFixedRateUnits (ResourceAssignment) field.
FixedMaterial25Represents the FixedMaterial (ResourceAssignment) field.
LevelingDelay26Represents the LevelingDelay (ResourceAssignment) field.
LinkedFields27Represents the LinkedFields (ResourceAssignment) field.
Milestone28Represents the Milestone (ResourceAssignment) field.
Notes29Represents the Notes (ResourceAssignment) field.
NotesText30Represents the NotesText (ResourceAssignment) field.
NotesRTF31Represents the NotesRTF (ResourceAssignment) field.
Overallocated32Represents the Overallocated (ResourceAssignment) field.
OvertimeCost33Represents the OvertimeCost (ResourceAssignment) field.
OvertimeWork34Represents the OvertimeWork (ResourceAssignment) field.
PeakUnits35Represents the PeakUnits (ResourceAssignment) field.
RegularWork36Represents the RegularWork (ResourceAssignment) field.
RemainingCost37Represents the RemainingCost (ResourceAssignment) field.
RemainingOvertimeCost38Represents the RemainingOvertimeCost (ResourceAssignment) field.
RemainingOvertimeWork39Represents the RemainingOvertimeWork (ResourceAssignment) field.
RemainingWork40Represents the RemainingWork (ResourceAssignment) field.
ResponsePending41Represents the ResponsePending (ResourceAssignment) field.
Start42Represents the Start (ResourceAssignment) field.
Stop43Represents the Stop (ResourceAssignment) field.
Resume44Represents the Resume (ResourceAssignment) field.
StartVariance45Represents the StartVariance (ResourceAssignment) field.
Summary46Represents the Summary (ResourceAssignment) field.
SV47Represents the SV (ResourceAssignment) field.
Units48Represents the Units (ResourceAssignment) field.
UpdateNeeded49Represents the UpdateNeeded (ResourceAssignment) field.
VAC50Represents the VAC (ResourceAssignment) field.
Work51Represents the Work (ResourceAssignment) field.
WorkContour52Represents the WorkContour (ResourceAssignment) field.
BCWS53Represents the BCWS (ResourceAssignment) field.
BCWP54Represents the BCWP (ResourceAssignment) field.
BookingType55Represents the BookingType (ResourceAssignment) field.
ActualWorkProtected56Represents the ActualWorkProtected (ResourceAssignment) field.
ActualOvertimeWorkProtected57Represents the ActualOvertimeWorkProtected (ResourceAssignment) field.
Created58Represents the Created (ResourceAssignment) field.
AssignmentOwner59Represents the AssignmentOwner (ResourceAssignment) field.
AssignmentOwnerGuid60Represents the AssignmentOwnerGuid (ResourceAssignment) field.
BudgetWork61Represents the BudgetWork (ResourceAssignment) field.
BudgetCost62Represents the BudgetCost (ResourceAssignment) field.
RateScale63Represents the RateScale (ResourceAssignment) field.
TaskUid64Represents the TaskUid (ResourceAssignment) field.
ResourceUid65Represents the ResourceUid (ResourceAssignment) field.

Examples

Shows how to read/write common properties.

var project = new Project();
project.Set(Prj.WorkFormat, TimeUnitType.Day);

var task = project.RootTask.Children.Add("Task 1");
task.Set(Tsk.Start, new DateTime(2000, 1, 3, 8, 0, 0));
task.Set(Tsk.Duration, project.GetDuration(8));

var resource = project.Resources.Add("Resource 1");
resource.Set(Rsc.Type, ResourceType.Work);

var assignment = project.ResourceAssignments.Add(task, resource);
assignment.Set(Asn.Start, new DateTime(2020, 4, 9, 8, 0, 0));
assignment.Set(Asn.Work, project.GetWork(1));
assignment.Set(Asn.Finish, new DateTime(2020, 4, 9, 17, 0, 0));
assignment.Set(Asn.Units, 1);
assignment.Set(Asn.PeakUnits, 1);

Console.WriteLine("Start: " + assignment.Get(Asn.Start));
Console.WriteLine("Work: " + assignment.Get(Asn.Work));
Console.WriteLine("Finish: " + assignment.Get(Asn.Finish));
Console.WriteLine("Units: " + assignment.Get(Asn.Units));
Console.WriteLine("Peak Units: " + assignment.Get(Asn.PeakUnits));

See Also