Layer Home

A Layer is a logical grouping of data, assembled as though they were laid out on transparent acetate overlays. The user may choose to put certain types of entities on certain layers.  Layers can be turned off and on, so that their respective data can be viewed in or out of context with adjacent layers. All new graphic objects are added to the current layer. When you create a new drawing it will already have one layer named "0".

These are the functions used to manage layers in a drawing:

Function Meaning
lcDrwAddLayer Adds a new layer into a drawing
lcDrwDeleteObject Deletes an object from a drawing
lcDrwCountObjects Counts a number of objects, by type
lcDrwSortObjects Sorts objects by LC_PROP_TABLE_PRIORITY
lcDrwGetFirstObject
lcDrwGetNextObject
Used to sequentially retrieve all objects
lcDrwGetObjectByName Retrieves an object by its name
lcDrwGetObjectByID
lcDrwGetObjectByIDH
Retrieves object by its identifier

Layer functions:

Function Meaning
lcLayerClear Deletes all entities on the layer

Layer object has the following properties :

Property Type Access Meaning
LC_PROP_TABLE_...    Base class properties
LC_PROP_LAYER_ID int
string
R Unique Identifier
Hexadecimal string (up to 16 characters)
LC_PROP_LAYER_NAME string RW Layer Name
LC_PROP_LAYER_DESCR string RW Layer description
LC_PROP_LAYER_DRW handle R Handle to owner drawing
LC_PROP_LAYER_COLOR string RW Color of graphic objects
LC_PROP_LAYER_COLORI int
bool
RW
R
Color Index (1..255)
TRUE if the color is index
LC_PROP_LAYER_COLORT int
bool
RW
R
True Color (COLORREF)
TRUE if the color is RGB
LC_PROP_LAYER_FCOLOR string RW Filling Color of graphic objects
LC_PROP_LAYER_FCOLORI int
bool
RW
R
Color Index (1..255)
TRUE if the filling color is index
LC_PROP_LAYER_FCOLORT int
bool
RW
R
True Color (COLORREF)
TRUE if the filling color is RGB
LC_PROP_LAYER_LINETYPE handle
string
RW Handle to Linetype
Name of Linetype
LC_PROP_LAYER_LWIDTH int RW Linewidth
LC_PROP_LAYER_LOCKED bool RW "Locked" flag
LC_PROP_LAYER_NOPRINT bool RW "Not printable" flag
LC_PROP_LAYER_VISIBLE bool RW "Visible" flag
LC_PROP_LAYER_0 bool R "Layer 0" flag
LC_PROP_LAYER_NODLG bool RW Not displayed in the "Layers" dialog
LC_PROP_LAYER_JUMPLINES bool RW Enable jump lines for entities of this layer
LC_PROP_LAYER_OSNAP bool RW Enable object snap for entities of this layer
LC_PROP_LAYER_NOEXPORT bool RW If true then the layer and related entities will not be exported

See also

  Named objects