CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2025 开发者帮助

NumberOfCopies 属性 (ActiveX)

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

NumberOfCopies 属性 (ActiveX)

指定要打印的副本数。

支持的平台:仅限 Windows

签名

VBA:

object.NumberOfCopies
对象

类型: 剧情

此属性应用于的对象。

属性值

只读:

类型:

要打印的副本数。

言论

没有其他评论。

例子

VBA:

Sub Example_NumberOfCopies()
    ' 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

可视化 LISP:

(vl-load-com)
(defun c:Example_NumberOfCopies()
    ;; 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))
    (vla-SetLayoutsToPlot oPlot AddedLayouts)
    (vla-PlotToDevice oPlot "DWF6 ePlot.pc3")
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

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

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部