指定 AutoCAD 在打开包含自定义对象的图形时是否显示警告消息。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性的初始值为。True 注意:此属性的值存储在代理通知系统变量中。
例子工 务 局: Sub Example_ShowProxyDialogBox()
' This example returns the current setting of
' ShowProxyDialogBox. It then changes the value, and finally
' it resets the value back to the original setting.
Dim preferences As AcadPreferences
Dim currShowProxyDialogBox As Boolean
Set preferences = ThisDrawing.Application.Preferences
' Retrieve the current ShowProxyDialogBox value
currShowProxyDialogBox = preferences.OpenSave.ShowProxyDialogBox
MsgBox "The current value for ShowProxyDialogBox is " & preferences.OpenSave.ShowProxyDialogBox, vbInformation, "ShowProxyDialogBox Example"
' Change the value for ShowProxyDialogBox
preferences.OpenSave.ShowProxyDialogBox = Not (currShowProxyDialogBox)
MsgBox "The new value for ShowProxyDialogBox is " & preferences.OpenSave.ShowProxyDialogBox, vbInformation, "ShowProxyDialogBox Example"
' Reset ShowProxyDialogBox to its original value
preferences.OpenSave.ShowProxyDialogBox = currShowProxyDialogBox
MsgBox "The ShowProxyDialogBox value is reset to " & preferences.OpenSave.ShowProxyDialogBox, vbInformation, "ShowProxyDialogBox Example"
End Sub
Visual LISP: (vl-load-com)
(defun c:Example_ShowProxyDialogBox()
;; This example returns the current setting of
;; ShowProxyDialogBox. 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 ShowProxyDialogBox value
(setq currShowProxyDialogBox (vla-get-ShowProxyDialogBox (vla-get-OpenSave preferences)))
(alert (strcat "The current value for ShowProxyDialogBox is " (if (= currShowProxyDialogBox :vlax-true) "True" "False")))
;; Change the value for ShowProxyDialogBox
(vla-put-ShowProxyDialogBox (vla-get-OpenSave preferences) (if (= currShowProxyDialogBox :vlax-true) :vlax-false :vlax-true))
(alert (strcat "The new value for ShowProxyDialogBox is " (if (= (vla-get-ShowProxyDialogBox (vla-get-OpenSave preferences)) :vlax-true) "True" "False")))
;; Reset ShowProxyDialogBox to its original value
(vla-put-ShowProxyDialogBox (vla-get-OpenSave preferences) currShowProxyDialogBox)
(alert (strcat "The ShowProxyDialogBox value is reset to " (if (= (vla-get-ShowProxyDialogBox (vla-get-OpenSave preferences)) :vlax-true) "True" "False")))
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 08:51
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.