Share

AcDbEntity::layer (AcString &) Method

C++

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

Description

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

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.

Parameters

Parameters Description
sName Output name of the layer

Links

AcDbEntity

Was this information helpful?