指定是在启动时加载 acad.lsp 还是随每个图形一起加载。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性的初始值为。True 注意:此属性的值存储在 ACADLSPASDOC 系统变量中。
例子工 务 局: Sub Example_LoadAcadLspInAllDocuments() ' This example returns the current setting of ' LoadAcadLspInAllDocuments. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currLoadAcadLspInAllDocuments As Boolean Set preferences = ThisDrawing.Application.preferences ' Retrieve the current LoadAcadLspInAllDocuments value currLoadAcadLspInAllDocuments = preferences.System.LoadAcadLspInAllDocuments MsgBox "The current value for LoadAcadLspInAllDocuments is " & preferences.System.LoadAcadLspInAllDocuments, vbInformation, "LoadAcadLspInAllDocuments Example" ' Change the value for LoadAcadLspInAllDocuments preferences.System.LoadAcadLspInAllDocuments = Not (currLoadAcadLspInAllDocuments) MsgBox "The new value for LoadAcadLspInAllDocuments is " & preferences.System.LoadAcadLspInAllDocuments, vbInformation, "LoadAcadLspInAllDocuments Example" ' Reset LoadAcadLspInAllDocuments to its original value preferences.System.LoadAcadLspInAllDocuments = currLoadAcadLspInAllDocuments MsgBox "The LoadAcadLspInAllDocuments value is reset to " & preferences.System.LoadAcadLspInAllDocuments, vbInformation, "LoadAcadLspInAllDocuments Example" End Sub Visual LISP: (vl-load-com) (defun c:Example_LoadAcadLspInAllDocuments() ;; This example returns the current setting of ;; LoadAcadLspInAllDocuments. It then changes the value, and finally ;; it resets the value back to the original setting. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Retrieve the current LoadAcadLspInAllDocuments value (setq currLoadAcadLspInAllDocuments (vla-get-LoadAcadLspInAllDocuments (vla-get-System preferences))) (alert (strcat "The current value for LoadAcadLspInAllDocuments is " (if (= currLoadAcadLspInAllDocuments :vlax-true) "True" "False"))) ;; Change the value for LoadAcadLspInAllDocuments (vla-put-LoadAcadLspInAllDocuments (vla-get-System preferences) (if (= currLoadAcadLspInAllDocuments :vlax-true) :vlax-false :vlax-true)) (alert (strcat "The new value for LoadAcadLspInAllDocuments is " (if (= (vla-get-LoadAcadLspInAllDocuments (vla-get-System preferences)) :vlax-true) "True" "False"))) ;; Reset LoadAcadLspInAllDocuments to its original value (vla-put-LoadAcadLspInAllDocuments (vla-get-System preferences) currLoadAcadLspInAllDocuments) (alert (strcat "The LoadAcadLspInAllDocuments value is reset to " (if (= (vla-get-LoadAcadLspInAllDocuments (vla-get-System preferences)) :vlax-true) "True" "False"))) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:32
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.