CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

自动审核属性 (ActiveX)

2023-1-3 22:18| 发布者: admin| 查看: 423| 评论: 0|来自: AutoCAD

摘要: 指定 AutoCAD 在呈现 DXFIN 或 DXBIN 交换命令后是否应执行审计。

指定 AutoCAD 在呈现 DXFIN 或 DXBIN 交换命令后是否应执行审计。

支持的平台:仅窗口

签名

工 务 局:

object.AutoAudit
对象

类型:首选项打开保存

此属性适用的对象。

属性值

只读:

类型:布尔

  • True:在每个 DXFIN 或 DXBIN 命令后执行审核。
  • False:在每个 DXFIN 或 DXBIN 命令之后不执行审核。

言论

没有额外的评论。

例子

工 务 局:

Sub Example_AutoAudit()
    ' This example returns the current setting of
    ' AutoAudit. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currAutoAudit As Boolean
    Dim newAutoAudit As Boolean
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current AutoAudit value
    currAutoAudit = preferences.OpenSave.AutoAudit
    MsgBox "The current value for AutoAudit is " & currAutoAudit, vbInformation, "AutoAudit Example"
    
    ' Toggle the value for AutoAudit
    newAutoAudit = Not (currAutoAudit)
    preferences.OpenSave.AutoAudit = newAutoAudit
    MsgBox "The new value for AutoAudit is " & newAutoAudit, vbInformation, "AutoAudit Example"
    
    ' Reset AutoAudit to its original value
    preferences.OpenSave.AutoAudit = currAutoAudit
    MsgBox "The AutoAudit value is reset to " & currAutoAudit, vbInformation, "AutoAudit Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_AutoAudit()
    ;; This example returns the current setting of
    ;; AutoAudit. 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 AutoAudit value
    (setq currAutoAudit (vla-get-AutoAudit (vla-get-OpenSave preferences)))
    (alert (strcat "The current value for AutoAudit is " (if (= currAutoAudit :vlax-true) "True" "False")))
    
    ;; Toggle the value for AutoAudit
    (setq newAutoAudit (if (= currAutoAudit :vlax-true) :vlax-false :vlax-true))
    (vla-put-AutoAudit (vla-get-OpenSave preferences) newAutoAudit)
    (alert (strcat "The new value for AutoAudit is " (if (= newAutoAudit :vlax-true) "True" "False")))
    
    ;; Reset AutoAudit to its original value
    (vla-put-AutoAudit (vla-get-OpenSave preferences) currAutoAudit)
    (alert (strcat "The AutoAudit value is reset to " (if (= currAutoAudit :vlax-true) "True" "False")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 11:25

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部