API Reference > OdDb Classes > OdDbEntity Class > OdDbEntity Methods > OdDbEntity::setColorIndex Method
OdDbEntity::setColorIndex Method
Syntax
C++
virtual OdResult setColorIndex(OdUInt16 colorIndex, bool doSubents = true);
Parameters 
Description 
OdUInt16 colorIndex 
[in] Color index.  
bool doSubents = true 
[in] If and only if true, applies the change to all sub-entities owned by this entity. 

Returns eOk if successful, or an appropriate error code if not. 

colorIndex will be in the range [0 .. 256].

  • 0 indicates a color of BYBLOCK.
  • 256 indicates a color of BYLAYER.

Sets the color index of this entity (DXF 62). 

 

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