API Reference > OdDb Classes > OdDbLayerTableRecord Class > OdDbLayerTableRecord Methods > OdDbLayerTableRecord::setColorIndex Method
OdDbLayerTableRecord::setColorIndex Method
Syntax
C++
void setColorIndex(OdInt16 idxColor);
Parameters 
Description 
OdInt16 idxColor 
[in] Color index in range 1 to 255. 

Sets the color index for the layer record object (DXF 62) as an Integer value. The initial value is 7 (Foreground) by default. 

 

When the index outs the range 1 to 255, this method generates an exception. This method sets the color method to byACI.

Example of Working with the Layer Record Object 

Specific Properties of Layers 

OdDbLayerTableRecord::colorIndex() method

Copyright © 2002–2020. Open Design Alliance. All rights reserved.