The Restore method resets all layer settings in the current drawing to values that were saved earlier. For example, if you save the drawing's color and linetype settings under the name â€śColorLinetypeâ€ť and subsequently change those settings, restoring â€śColorLinetypeâ€ť resets the layers to the colors and linetypes they had when â€śColorLinetypeâ€ť was saved. If you add new layers to the drawing after saving â€śColorLinetype,â€ť those new layers are not affected when you restore â€śColorLinetype.â€ť
Restore the color and linetype settings of a drawing's layers
Assuming that the color and linetype settings of the layers in the current drawing were previously saved under the name â€śColorLinetype,â€ť the following code resets the color and linetype settings of each layer in the drawing to the value they had when â€śColorLinetypeâ€ť was saved.
Dim oLSM As AcadLayerStateManager
Set oLSM = ThisDrawing.Application. _