Changing Objectís Attribute
Previous Topic  Next Topic 

The objects general attribute are Color, Layer, Linetype, Linetype scale.

 

Color

 

The objects color can be changed to other color by the following command:

 

// Assign a System Color to the object.

poly.LineColor.FromSystemColor(Color.Red);

// Assign a DXF ACI color index to the object, the color index values ranging from 0 to 256.

poly.LineColor.ColorIndex = 1;

// The object assume the color of the layer upon which they are drawn.

poly.LineColor.ByColor= SeeDraw.Objects.Constants.ByType.ByLayer;

 

 

Layer

 

All new objects are added to the active layer. The object can be assigned to other layer  by the following command:

 

poly.LayerName = "testing";

 

 

LineType

 

At default, SeeDraw create a list of linetype :

 

DASHED,

DASHED0,

BORDER,

BORDER2,

BORDERX2,

CENTER,

CENTER2,

CENTERX2,

DASHDOT,

DASHDOT0,

DASHDOT2,

DASHDOTDOT0,

DASHDOTX2,

DASHED2,

DASHEDX2,

DIVIDE,

DIVIDE2,

DIVIDEX2,

DOT,

DOT0,

DOT2,

DOTX2,

HIDDEN,

HIDDE2,

HIDDENX2,

INVISIBLE,

PHANTOM,

PHANTOM2,

PHANTOMX2,

 

The different linetype can easily be assigned to the object by the following command:

 

poly.LineType = "DASHED";

 

The user may change the linetype scale by the following command:

 

poly.LineTypeScale = 10;