DisplayPlotPreview 方法 (ActiveX)
显示包含完整视图预览的“打印预览”对话框。 支持的平台:仅限 Windows 签名VBA: object.DisplayPlotPreview Preview
返回值 (RetVal)无返回值。 言论在活动布局上调用预览。 完整预览会在屏幕上显示绘图,就像在纸上打印时一样。这需要重新生成图形。它比普通打印再生更快,因为 AutoCAD 不执行矢量排序或优化。 在调用此方法期间,将忽略属性和方法设置。NumberOfCopiesSetLayoutsToPlot 此方法在批处理模式下不可用,如果在批处理模式下调用,则将返回。E_FAIL 调用此方法时,关联的图形将处于活动状态。该方法完成后,此图形将保持活动状态。DisplayPlotPreview 此方法将关联的图形置于一种特殊的显示模式,该模式只能通过用户交互退出。因此,从该方法成功返回后,关联的图形将处于活动状态,并将保留在打印预览显示模式中。DisplayPlotPreview 例子VBA: Sub Example_DisplayPlotPreview() ' This example creates a circle and then performs ' a plot preview. ' Create the circle Dim circleObj As AcadCircle Dim center(0 To 2) As Double Dim radius As Double center(0) = 2: center(1) = 2: center(2) = 0 radius = 1 Set circleObj = ThisDrawing.modelSpace.AddCircle(center, radius) ZoomAll ' Preview the plot of the circle ThisDrawing.ActiveLayout.ConfigName = "DWG to PDF.pc3" ThisDrawing.Plot.DisplayPlotPreview acFullPreview End Sub 可视化 LISP: (vl-load-com) (defun c:Example_DisplayPlotPreview() ;; This example creates a circle and then performs ;; a plot preview. (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) ;; Create the circle (setq center (vlax-3d-point 2 2 0) radius 1) (setq modelSpace (vla-get-ModelSpace doc)) (setq circleObj (vla-AddCircle modelSpace center radius)) (vla-ZoomAll acadObj) ;; Preview the plot of the circle (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWG to PDF.pc3") (vla-DisplayPlotPreview (vla-get-Plot doc) acFullPreview) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 11:23
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.