CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

QuietErrorMode 属性 (ActiveX)

2023-1-3 07:43| 发布者: admin| 查看: 402| 评论: 0|来自: AutoCAD

摘要: 切换打印错误报告的静默错误模式。

切换打印错误报告的静默错误模式。

支持的平台:仅窗口

签名

工 务 局:

object.QuietErrorMode
对象

类型:剧情

此属性适用的对象。

属性值

只读:

类型:布尔

  • True:启用安静错误模式。
  • False:禁用安静错误模式。

言论

安静错误模式将所有与绘图相关的错误消息记录到日志文件中。

禁用安静错误模式时,将使用正常的错误报告机制(警报框)。

例子

工 务 局:

Sub Example_QuietErrorMode()
    ' This example plots the layouts of a drawing.

    Dim oPlot As AcadPlot
    Dim AddedLayouts() As String
    Dim LayoutList As Variant
    Dim oLayout As ACADLayout
    Dim ArraySize As Integer, BatchCount As Integer
    
    For Each oLayout In ThisDrawing.Layouts
        ArraySize = ArraySize + 1
        ReDim Preserve AddedLayouts(1 To ArraySize)
        AddedLayouts(ArraySize) = oLayout.Name
    Next

    LayoutList = AddedLayouts
    Set oPlot = ThisDrawing.Plot
    oPlot.SetLayoutsToPlot LayoutList
    oPlot.PlotToDevice "DWF6 ePlot.pc3"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_QuietErrorMode()
    ;; This example plots the layouts of a drawing.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (setq AddedLayouts (vlax-make-safearray vlax-vbString (cons 0 (1- (vla-get-Count (vla-get-Layouts doc)))))
          ArraySize 0)
    
    (vlax-for oLayout (vla-get-Layouts doc)
        (vlax-safearray-put-element AddedLayouts ArraySize (vla-get-Name oLayout))
        (setq ArraySize (1+ ArraySize))
    )

    (setq oPlot (vla-get-Plot doc))
    (setq currMode (vla-get-QuietErrorMode oPlot))
    (vla-put-QuietErrorMode oPlot :vlax-true)
    (vla-SetLayoutsToPlot oPlot AddedLayouts)
    (vla-PlotToDevice oPlot "DWF6 ePlot.pc3")
    (vla-put-QuietErrorMode oPlot currMode)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 13:10

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部