Share

AcDbEntity::layer

C++

ACHAR* layer() const;

Description

This function returns a copy of the name string in the AcDbLayerTableRecord object referenced by the entity.

The calling application is responsible for deallocating the memory used by the returned string. The acutDelString() function is recommended.

Warning

Calling this function before the entity has had its referenced layer object ID set (that is, it's still set to AcDbObjectId::kNull) will terminate AutoCAD. If the referenced layer objectId is AcDbObjectId::kNull when the entity is added to a database, it will be set to the object ID of the database's current default layer.

Links

AcDbEntity

Use Instead

ACDBCORE2D_PORT Acad::ErrorStatus layer(AcString & sName) const;

History

AutoCAD 2019

This method has been marked as deprecated.

Was this information helpful?