C++
Acad::ErrorStatus saveLayerState( const ACHAR * sName, LayerStateMask mask, const AcDbObjectId& idVp );
Description
Saves the current state of the layer table to the layer state specified by sName. This function also captures the VPLAYER settings for the viewport specified. Specify AcDbObjectId::kNull for the idVp argument to capture a layer state without VPLAYER settings.
Return Value | Description |
---|---|
Acad::eOk | Successful save. |
Acad::eNotInitializedYet | The database or transaction manager is null. |
Acad::eDuplicateKey | The layer state already exists. |
Acad::eOutOfMemory | The layer state xrecord cannot be created. |
Acad::eKeyNotFound | The object ID of the layer state dictionary is null. |
Other possible Acad::ErrorStatus values unequal to Acad::eOk can come from internal calls to AcDbDatabase::getSymbolTable() while getting the layer table; acDbOpenObject() while opening the layer states dictionary; or AcDbDictionary::setAt () while setting the new state in the extension dictionary.
Parameters
Parameters | Description |
---|---|
sName | Input name of layer state to save |
mask | Input mask to apply to layer state |
idVp | Input object ID of the viewport whose VPLAYER setting is to be captured |