API Reference > OdDb Classes > OdDbEntity Class > OdDbEntity Methods > setMaterial Method > OdDbEntity::setMaterial Method (OdString&, bool)
OdDbEntity::setMaterial Method (OdString&, bool)
Syntax
C++
virtual OdResult setMaterial(const OdString& materialName, bool doSubents = true);
Parameters 
Description 
const OdString& materialName 
[in] Name of the material.  
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 material to be referenced by this entity (DXF 347). 

 

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