ExtendedAttributeTask

ExtendedAttributeTask enumeration

Specifies the extended attributes FieldId used in a task.

public enum ExtendedAttributeTask

Values

Name Value Description
Cost1 188743786 Cost1 (Task) custom field.
Cost2 188743787 Cost2 (Task) custom field.
Cost3 188743788 Cost3 (Task) custom field.
Cost4 188743938 Cost4 (Task) custom field.
Cost5 188743939 Cost5 (Task) custom field.
Cost6 188743940 Cost6 (Task) custom field.
Cost7 188743941 Cost7 (Task) custom field.
Cost8 188743942 Cost8 (Task) custom field.
Cost9 188743943 Cost9 (Task) custom field.
Cost10 188743944 Cost10 (Task) custom field.
Date1 188743945 Date1 (Task) custom field.
Date2 188743946 Date2 (Task) custom field.
Date3 188743947 Date3 (Task) custom field.
Date4 188743948 Date4 (Task) custom field.
Date5 188743949 Date5 (Task) custom field.
Date6 188743950 Date6 (Task) custom field.
Date7 188743951 Date7 (Task) custom field.
Date8 188743952 Date8 (Task) custom field.
Date9 188743953 Date9 (Task) custom field.
Date10 188743954 Date10 (Task) custom field.
Duration1 188743783 Duration1 (Task) custom field.
Duration2 188743784 Duration2 (Task) custom field.
Duration3 188743785 Duration3 (Task) custom field.
Duration4 188743955 Duration4 (Task) custom field.
Duration5 188743956 Duration5 (Task) custom field.
Duration6 188743957 Duration6 (Task) custom field.
Duration7 188743958 Duration7 (Task) custom field.
Duration8 188743959 Duration8 (Task) custom field.
Duration9 188743960 Duration9 (Task) custom field.
Duration10 188743961 Duration10 (Task) custom field.
Finish1 188743733 Finish1 (Task) custom field.
Finish2 188743736 Finish2 (Task) custom field.
Finish3 188743739 Finish3 (Task) custom field.
Finish4 188743742 Finish4 (Task) custom field.
Finish5 188743745 Finish5 (Task) custom field.
Finish6 188743963 Finish6 (Task) custom field.
Finish7 188743965 Finish7 (Task) custom field.
Finish8 188743967 Finish8 (Task) custom field.
Finish9 188743969 Finish9 (Task) custom field.
Finish10 188743971 Finish10 (Task) custom field.
Flag1 188743752 Flag1 (Task) custom field.
Flag2 188743753 Flag2 (Task) custom field.
Flag3 188743754 Flag3 (Task) custom field.
Flag4 188743755 Flag4 (Task) custom field.
Flag5 188743756 Flag5 (Task) custom field.
Flag6 188743757 Flag6 (Task) custom field.
Flag7 188743758 Flag7 (Task) custom field.
Flag8 188743759 Flag8 (Task) custom field.
Flag9 188743760 Flag9 (Task) custom field.
Flag10 188743761 Flag10 (Task) custom field.
Flag11 188743972 Flag11 (Task) custom field.
Flag12 188743973 Flag12 (Task) custom field.
Flag13 188743974 Flag13 (Task) custom field.
Flag14 188743975 Flag14 (Task) custom field.
Flag15 188743976 Flag15 (Task) custom field.
Flag16 188743977 Flag16 (Task) custom field.
Flag17 188743978 Flag17 (Task) custom field.
Flag18 188743979 Flag18 (Task) custom field.
Flag19 188743980 Flag19 (Task) custom field.
Flag20 188743981 Flag20 (Task) custom field.
Number1 188743767 Number1 (Task) custom field.
Number2 188743768 Number2 (Task) custom field.
Number3 188743769 Number3 (Task) custom field.
Number4 188743770 Number4 (Task) custom field.
Number5 188743771 Number5 (Task) custom field.
Number6 188743982 Number6 (Task) custom field.
Number7 188743983 Number7 (Task) custom field.
Number8 188743984 Number8 (Task) custom field.
Number9 188743985 Number9 (Task) custom field.
Number10 188743986 Number10 (Task) custom field.
Number11 188743987 Number11 (Task) custom field.
Number12 188743988 Number12 (Task) custom field.
Number13 188743989 Number13 (Task) custom field.
Number14 188743990 Number14 (Task) custom field.
Number15 188743991 Number15 (Task) custom field.
Number16 188743992 Number16 (Task) custom field.
Number17 188743993 Number17 (Task) custom field.
Number18 188743994 Number18 (Task) custom field.
Number19 188743995 Number19 (Task) custom field.
Number20 188743996 Number20 (Task) custom field.
Start1 188743732 Start1 (Task) custom field.
Start2 188743735 Start2 (Task) custom field.
Start3 188743738 Start3 (Task) custom field.
Start4 188743741 Start4 (Task) custom field.
Start5 188743744 Start5 (Task) custom field.
Start6 188743962 Start6 (Task) custom field.
Start7 188743964 Start7 (Task) custom field.
Start8 188743966 Start8 (Task) custom field.
Start9 188743968 Start9 (Task) custom field.
Start10 188743970 Start10 (Task) custom field.
Text1 188743731 Text1 (Task) custom field.
Text2 188743734 Text2 (Task) custom field.
Text3 188743737 Text3 (Task) custom field.
Text4 188743740 Text4 (Task) custom field.
Text5 188743743 Text5 (Task) custom field.
Text6 188743746 Text6 (Task) custom field.
Text7 188743747 Text7 (Task) custom field.
Text8 188743748 Text8 (Task) custom field.
Text9 188743749 Text9 (Task) custom field.
Text10 188743750 Text10 (Task) custom field.
Text11 188743997 Text11 (Task) custom field.
Text12 188743998 Text12 (Task) custom field.
Text13 188743999 Text13 (Task) custom field.
Text14 188744000 Text14 (Task) custom field.
Text15 188744001 Text15 (Task) custom field.
Text16 188744002 Text16 (Task) custom field.
Text17 188744003 Text17 (Task) custom field.
Text18 188744004 Text18 (Task) custom field.
Text19 188744005 Text19 (Task) custom field.
Text20 188744006 Text20 (Task) custom field.
Text21 188744007 Text21 (Task) custom field.
Text22 188744008 Text22 (Task) custom field.
Text23 188744009 Text23 (Task) custom field.
Text24 188744010 Text24 (Task) custom field.
Text25 188744011 Text25 (Task) custom field.
Text26 188744012 Text26 (Task) custom field.
Text27 188744013 Text27 (Task) custom field.
Text28 188744014 Text28 (Task) custom field.
Text29 188744015 Text29 (Task) custom field.
Text30 188744016 Text30 (Task) custom field.
OutlineCode1 188744096 OutlineCode1 (Task) custom field.
OutlineCode2 188744098 OutlineCode2 (Task) custom field.
OutlineCode3 188744100 OutlineCode3 (Task) custom field.
OutlineCode4 188744102 OutlineCode4 (Task) custom field.
OutlineCode5 188744104 OutlineCode5 (Task) custom field.
OutlineCode6 188744106 OutlineCode6 (Task) custom field.
OutlineCode7 188744108 OutlineCode7 (Task) custom field.
OutlineCode8 188744110 OutlineCode8 (Task) custom field.
OutlineCode9 188744112 OutlineCode9 (Task) custom field.
OutlineCode10 188744114 OutlineCode10 (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