Class OutlineMask

OutlineMask class

Represents four elements of a mask which defines an outline code format.

public class OutlineMask

Constructors

NameDescription
OutlineMask()Initializes a new instance of the OutlineMask class.

Properties

NameDescription
Length { get; set; }Gets or sets the maximum length (in characters) of the outline code values. 0 if length is not defined.
Level { get; set; }Gets or sets the level of a mask.
Separator { get; set; }Gets or sets the separator of code values.
Type { get; set; }Gets or sets the type of a mask.

Examples

Shows how to work with outline masks.

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

var outline = new OutlineCodeDefinition();
outline.FieldId = ExtendedAttributeTask.OutlineCode7.ToString("D");
outline.Alias = "My Outline Code";

project.OutlineCodes.Add(outline);

var mask = new OutlineMask();

// set the type of a mask
mask.Type = MaskType.Characters;

// set the separator of code values
mask.Separator = "/";

// set the level of a mask
mask.Level = 1;

// set the maximum length (in characters) of the outline code values. 0 if length is not defined.
mask.Length = 2;

// add the mask to the definition
outline.Masks.Add(mask);

var value = new OutlineValue();
value.Value = "Text value 1";
value.ValueId = 1;
value.Type = OutlineValueType.Text;
value.Description = "Text value descr 1";
outline.Values.Add(value);

// ...

See Also