API Reference > OdDb Classes > OdDbLayerState Class > OdDbLayerState Methods > OdDbLayerState::restore Method
OdDbLayerState::restore Method
Syntax
C++
static void restore(OdDbDatabase * pDb, const OdString & layerStateName, int flags = OdDbLayerStateManager::kUndefDoNothing, const int layerStateMask = -1, const OdDbObjectId& viewportId = OdDbObjectId::kNull);
Parameters 
Description 
OdDbDatabase * pDb 
[in] Pointer to the database.  
const OdString & layerStateName 
[in] LayerState name.  
const int layerStateMask = -1 
[in] LayerState mask.  
const OdDbObjectId& viewportId = OdDbObjectId::kNull 
[in] Viewport whose LayerState is to be saved.  
undefAction 
[in] Action for undefined layers. 

Restores the specified LayerState of the specified database. 

 

undefAction specified the action for layers not defined in the LayerState. undefAction must be one of the following: 

 

Name 
Value 
kUndefDoNothing 
kUndefTurnOff 
kUndefFreeze 

 

layerStateMask determines which layer attributes are to be restored from the LayerState. layerStateMask must be a combination of one or more of the following: 

 

Name 
Value 
kDefMask 
0xFFFFFFFF 
kNone 
0x0000 
kOn 
0x0001 
kFrozen 
0x0002 
kLocked 
0x0004 
kPlot 
0x0008 
kNewViewport 
0x0010 
kColor 
0x0020 
kLineType 
0x0040 
kLineWeight 
0x0080 
kPlotStyle 
0x0100 
kCurrentViewport 
0x0200 
kTransparency 
0x0400 
kAll 
kOn | kFrozen | kLocked | kPlot | kNewViewport | 
 
kColor | kLineType | kLineWeight | kPlotStyle | 
 
kCurrentViewport | kTransparency 
kHidden 
0x8000 
Copyright © 2002–2020. Open Design Alliance. All rights reserved.