CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

ShowProxyDialogBox Property (ActiveX)

2023-1-3 06:15| 发布者: admin| 查看: 229| 评论: 0|来自: AutoCAD

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

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

支持的平台:仅窗口

签名

工 务 局:

object.ShowProxyDialogBox
对象

类型:首选项打开保存

此属性适用的对象。

属性值

只读:

类型:布尔

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

言论

此属性的初始值为。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")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 12:47

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部