Enum ExtendedAttributeTask

ExtendedAttributeTask enumeration

Specifies the extended attributes FieldId used in a task.

public enum ExtendedAttributeTask

Values

NameValueDescription
Cost1188743786Cost1 (Task) custom field.
Cost2188743787Cost2 (Task) custom field.
Cost3188743788Cost3 (Task) custom field.
Cost4188743938Cost4 (Task) custom field.
Cost5188743939Cost5 (Task) custom field.
Cost6188743940Cost6 (Task) custom field.
Cost7188743941Cost7 (Task) custom field.
Cost8188743942Cost8 (Task) custom field.
Cost9188743943Cost9 (Task) custom field.
Cost10188743944Cost10 (Task) custom field.
Date1188743945Date1 (Task) custom field.
Date2188743946Date2 (Task) custom field.
Date3188743947Date3 (Task) custom field.
Date4188743948Date4 (Task) custom field.
Date5188743949Date5 (Task) custom field.
Date6188743950Date6 (Task) custom field.
Date7188743951Date7 (Task) custom field.
Date8188743952Date8 (Task) custom field.
Date9188743953Date9 (Task) custom field.
Date10188743954Date10 (Task) custom field.
Duration1188743783Duration1 (Task) custom field.
Duration2188743784Duration2 (Task) custom field.
Duration3188743785Duration3 (Task) custom field.
Duration4188743955Duration4 (Task) custom field.
Duration5188743956Duration5 (Task) custom field.
Duration6188743957Duration6 (Task) custom field.
Duration7188743958Duration7 (Task) custom field.
Duration8188743959Duration8 (Task) custom field.
Duration9188743960Duration9 (Task) custom field.
Duration10188743961Duration10 (Task) custom field.
Finish1188743733Finish1 (Task) custom field.
Finish2188743736Finish2 (Task) custom field.
Finish3188743739Finish3 (Task) custom field.
Finish4188743742Finish4 (Task) custom field.
Finish5188743745Finish5 (Task) custom field.
Finish6188743963Finish6 (Task) custom field.
Finish7188743965Finish7 (Task) custom field.
Finish8188743967Finish8 (Task) custom field.
Finish9188743969Finish9 (Task) custom field.
Finish10188743971Finish10 (Task) custom field.
Flag1188743752Flag1 (Task) custom field.
Flag2188743753Flag2 (Task) custom field.
Flag3188743754Flag3 (Task) custom field.
Flag4188743755Flag4 (Task) custom field.
Flag5188743756Flag5 (Task) custom field.
Flag6188743757Flag6 (Task) custom field.
Flag7188743758Flag7 (Task) custom field.
Flag8188743759Flag8 (Task) custom field.
Flag9188743760Flag9 (Task) custom field.
Flag10188743761Flag10 (Task) custom field.
Flag11188743972Flag11 (Task) custom field.
Flag12188743973Flag12 (Task) custom field.
Flag13188743974Flag13 (Task) custom field.
Flag14188743975Flag14 (Task) custom field.
Flag15188743976Flag15 (Task) custom field.
Flag16188743977Flag16 (Task) custom field.
Flag17188743978Flag17 (Task) custom field.
Flag18188743979Flag18 (Task) custom field.
Flag19188743980Flag19 (Task) custom field.
Flag20188743981Flag20 (Task) custom field.
Number1188743767Number1 (Task) custom field.
Number2188743768Number2 (Task) custom field.
Number3188743769Number3 (Task) custom field.
Number4188743770Number4 (Task) custom field.
Number5188743771Number5 (Task) custom field.
Number6188743982Number6 (Task) custom field.
Number7188743983Number7 (Task) custom field.
Number8188743984Number8 (Task) custom field.
Number9188743985Number9 (Task) custom field.
Number10188743986Number10 (Task) custom field.
Number11188743987Number11 (Task) custom field.
Number12188743988Number12 (Task) custom field.
Number13188743989Number13 (Task) custom field.
Number14188743990Number14 (Task) custom field.
Number15188743991Number15 (Task) custom field.
Number16188743992Number16 (Task) custom field.
Number17188743993Number17 (Task) custom field.
Number18188743994Number18 (Task) custom field.
Number19188743995Number19 (Task) custom field.
Number20188743996Number20 (Task) custom field.
Start1188743732Start1 (Task) custom field.
Start2188743735Start2 (Task) custom field.
Start3188743738Start3 (Task) custom field.
Start4188743741Start4 (Task) custom field.
Start5188743744Start5 (Task) custom field.
Start6188743962Start6 (Task) custom field.
Start7188743964Start7 (Task) custom field.
Start8188743966Start8 (Task) custom field.
Start9188743968Start9 (Task) custom field.
Start10188743970Start10 (Task) custom field.
Text1188743731Text1 (Task) custom field.
Text2188743734Text2 (Task) custom field.
Text3188743737Text3 (Task) custom field.
Text4188743740Text4 (Task) custom field.
Text5188743743Text5 (Task) custom field.
Text6188743746Text6 (Task) custom field.
Text7188743747Text7 (Task) custom field.
Text8188743748Text8 (Task) custom field.
Text9188743749Text9 (Task) custom field.
Text10188743750Text10 (Task) custom field.
Text11188743997Text11 (Task) custom field.
Text12188743998Text12 (Task) custom field.
Text13188743999Text13 (Task) custom field.
Text14188744000Text14 (Task) custom field.
Text15188744001Text15 (Task) custom field.
Text16188744002Text16 (Task) custom field.
Text17188744003Text17 (Task) custom field.
Text18188744004Text18 (Task) custom field.
Text19188744005Text19 (Task) custom field.
Text20188744006Text20 (Task) custom field.
Text21188744007Text21 (Task) custom field.
Text22188744008Text22 (Task) custom field.
Text23188744009Text23 (Task) custom field.
Text24188744010Text24 (Task) custom field.
Text25188744011Text25 (Task) custom field.
Text26188744012Text26 (Task) custom field.
Text27188744013Text27 (Task) custom field.
Text28188744014Text28 (Task) custom field.
Text29188744015Text29 (Task) custom field.
Text30188744016Text30 (Task) custom field.
OutlineCode1188744096OutlineCode1 (Task) custom field.
OutlineCode2188744098OutlineCode2 (Task) custom field.
OutlineCode3188744100OutlineCode3 (Task) custom field.
OutlineCode4188744102OutlineCode4 (Task) custom field.
OutlineCode5188744104OutlineCode5 (Task) custom field.
OutlineCode6188744106OutlineCode6 (Task) custom field.
OutlineCode7188744108OutlineCode7 (Task) custom field.
OutlineCode8188744110OutlineCode8 (Task) custom field.
OutlineCode9188744112OutlineCode9 (Task) custom field.
OutlineCode10188744114OutlineCode10 (Task) custom field.

Examples

Shows how to add extended attributes with lookups for assignments.

var project = new Project(DataDir + "Blank2010.mpp");

// Assign resource "1 TRG: Trade Group" to the "TASK 1" by creating a ResourceAssignment object.
var resource = project.Resources.GetById(1);
var task = project.RootTask.Children.GetById(1);
var assignment = project.ResourceAssignments.Add(task, resource);

// Create custom attribute definition with lookup.
var resExtendedAttributeDefinition = ExtendedAttributeDefinition.CreateLookupResourceDefinition(
    CustomFieldType.Cost,
    ExtendedAttributeResource.Cost5,
    "My lookup resource cost");
project.ExtendedAttributes.Add(resExtendedAttributeDefinition);

var firstValue = new Value { NumericValue = 1500, Description = "Val 1", Id = 1, Val = "1500" };
var secondValue = new Value { NumericValue = 2500, Description = "Val 2", Id = 2 };
resExtendedAttributeDefinition.AddLookupValue(firstValue);
resExtendedAttributeDefinition.AddLookupValue(secondValue);

// This value can be seen in "Resource usage" view of MS Project.
var attributeValue = resExtendedAttributeDefinition.CreateExtendedAttribute(firstValue);
assignment.ExtendedAttributes.Add(attributeValue);

// Create custom attribute definition with lookup.
var taskCostAttr = ExtendedAttributeDefinition.CreateLookupTaskDefinition(CustomFieldType.Cost, ExtendedAttributeTask.Cost4, "My lookup task cost");
project.ExtendedAttributes.Add(taskCostAttr);
var taskFirstValue = new Value { NumericValue = 18, Description = "Task val 1", Id = 3, Val = "18" };
var resSecondValue = new Value { NumericValue = 30, Description = "Task val 2", Id = 4 };
var taskWrongValue = new Value { NumericValue = 99, Description = "Task val Wrong", Id = 5, Val = "18" };

taskCostAttr.AddLookupValue(taskFirstValue);
resExtendedAttributeDefinition.AddLookupValue(resSecondValue);

// This value can be seen in "Task usage" view of MS Project.
assignment.ExtendedAttributes.Add(taskCostAttr.CreateExtendedAttribute(taskFirstValue));

// a wrong values can be removed later
taskCostAttr.RemoveLookupValue(taskWrongValue);

// working with project...

See Also