API Reference > OdDb Classes > OdDbEntity Class > OdDbEntity Methods > setLayer Method > OdDbEntity::setLayer Method (OdDbObjectId, bool, bool)
OdDbEntity::setLayer Method (OdDbObjectId, bool, bool)
Syntax
C++
virtual OdResult setLayer(OdDbObjectId layerId, bool doSubents = true, bool allowHiddenLayer = false);
Parameters 
Description 
OdDbObjectId layerId 
[in] Object ID of the LayerTableRecord.  
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.

Sets the layer to be referenced by this entity (DXF 8). 

 

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