Saves a document or group of layer property settings; no longer supported for menu groups.
Supported platforms: Windows only
VBA:
object.Save Name, Mask
Type: LayerStateManager
The object this method applies to.
Access: Input-only
Type: String
The name to be assigned to the saved layer settings.
Access: Input-only
Type: AcLayerStateMask enum
A number representing the layer properties to be saved and restored. Use the following constants to identify layer properties:
VBA:
object.Save MenuFileType
Type: MenuGroup
The object this method applies to.
Access: Input-only
Type: AcMenuFileType enum
No return value.
Document: When you save a document to a secure URL, a dialog box prompts the user for the necessary password information.
Menugroup: This method has no effect for menu groups in AutoCAD 2006 or later. This method will be removed from the MenuGroup object in a future release.
VBA:
Sub Example_Save()
' The following example saves current drawing
ThisDrawing.Save
End Sub
Sub Example_Save_LayerSettings()
' The following code saves the color and linetype settings
' of the current layer.
Dim oLSM As AcadLayerStateManager
' Access the LayerStateManager object
Set oLSM = ThisDrawing.Application. _
GetInterfaceObject("AutoCAD.AcadLayerStateManager.19")
' Associate the current drawing database with LayerStateManager
oLSM.SetDatabase ThisDrawing.Database
oLSM.Save "ColorLinetype", acLsColor + acLsLineType
End Sub
Visual LISP:
(defun c:Example_Save()
;; The following example saves current drawing
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(vla-Save doc)
)
(defun c:Example_Save_LayerSettings()
;; The following code saves the color and linetype settings
;; of the current layer.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Access the LayerStateManager object
(setq oLSM (vla-GetInterfaceObject acadObj "AutoCAD.AcadLayerStateManager.19"))
;; Associate the current drawing database with LayerStateManager
(vla-SetDatabase oLSM (vla-get-Database doc))
(vla-Save oLSM "ColorLinetype" (+ acLsColor acLsLineType))
)