CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2018 开发者帮助

ShowProxyDialogBox 属性 (ActiveX)

2024-5-18 16:55| 发布者: admin| 查看: 10| 评论: 0|原作者: admin|来自: AutoCAD

ShowProxyDialogBox 属性 (ActiveX)

指定打开包含自定义对象的图形时 AutoCAD 是否显示警告消息。

支持的平台:仅限 Windows

签名

VBA:

object.ShowProxyDialogBox
对象

类型:PreferencesOpenSave

此属性应用于的对象。

属性值

只读:

类型:布尔

  • True:显示警告。
  • False:不显示警告。

言论

此属性的初始值为 。True

注意:此属性的值存储在 PROXYNOTICE 系统变量中。

例子

VBA:

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

可视化 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")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-6-27 16:03

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部