恢复一组图层属性设置。 支持的平台:仅窗口 返回值(RetVal)无返回值。 言论该方法使用与保存的设置关联的属性来标识要恢复的图层属性。RestoreMask 例子工 务 局: Sub Example_RestoreLayerSettings()
' The following code restores color and linetype settings
' that were saved as "ColorLineType".
Dim oLSM As AcadLayerStateManager
Set oLSM = ThisDrawing.Application. _
GetInterfaceObject("AutoCAD.AcadLayerStateManager." & Left(AcadApplication.Version, 2))
oLSM.SetDatabase ThisDrawing.Database
oLSM.Restore "ColorLinetype"
End Sub
Visual LISP: (defun c:Example_Restore()
;; The following code restores color and linetype settings
;; that were saved as "ColorLineType."
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; Access the LayerStateManager object.
(setq oLSM (vla-GetInterfaceObject acadObj (strcat "AutoCAD.AcadLayerStateManager." (substr (getvar "ACADVER") 1 2))))
(vla-SetDatabase oLSM (vla-get-Database doc))
(vla-Restore oLSM "ColorLinetype")
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 11:54
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.