指定要打印的一个或多个布局。 支持的平台:仅窗口 返回值(RetVal)无返回值。 言论此方法可能会过时,并可能在AutoCAD的未来版本中删除。 如果layoutList参数 isor 根本不调用此方法,则活动布局将发送到绘图。NULL 每次调用 theormethod后,要绘制的默认布局将重置为活动布局。若要指定活动布局以外的任何布局,必须在每个绘图之前调用该方法。PlotToFilePlotToDeviceSetLayoutsToPlot 例子工 务 局: Sub Example_SetLayoutsToPlot()
' 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_SetLayoutsToPlot()
;; 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")
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-27 13:02
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.