The following functions set and retrieve the current layer value in the database:
Acad::ErrorStatus AcDbDatabase::setClayer( AcDbObjectId objId); AcDbObjectId AcDbDatabase::clayer() const;