保存文档或图层属性设置组;菜单组不再受支持。 支持的平台:仅窗口 签名 - 层状态管理器工 务 局: object.Save Name, Mask
签名 - 菜单组工 务 局: object.Save MenuFileType
返回值(RetVal)无返回值。 RemarksDocument: 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 object in a future release. MenuGroup ExamplesVBA: 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." & Left(AcadApplication.Version, 2)) ' 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 (strcat "AutoCAD.AcadLayerStateManager." (substr (getvar "ACADVER") 1 2)))) ;; Associate the current drawing database with LayerStateManager (vla-SetDatabase oLSM (vla-get-Database doc)) (vla-Save oLSM "ColorLinetype" (+ acLsColor acLsLineType)) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:18
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.