CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

打印属性 (活动 X)

2023-1-3 08:47| 发布者: admin| 查看: 457| 评论: 0|来自: AutoCAD

摘要: 获取文档的 Plot 对象。

获取文档的 Plot 对象。

支持的平台:仅窗口

签名

工 务 局:

object.Plot
对象

类型:文档

此属性适用的对象。

属性值

只读:是的

类型:剧情

文档的打印对象。

言论

没有额外的评论。

例子

工 务 局:

Sub Example_Plot()
    ' This example sends a plot of the current drawing
    ' to a file.
    
    ThisDrawing.ActiveLayout.ConfigName = "DWF6 ePlot.pc3"
    
    ' Define the plot variable
    Dim currentPlot As AcadPlot
    Set currentPlot = ThisDrawing.Plot
    
    ' Define the output file name.
    ' Use "" to use the drawing name as the file name.
    ' Note: if the file name exists an error will be generated.
    Dim plotFileName As String
    plotFileName = "MyPlot"
    
    currentPlot.PlotToFile plotFileName
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_Plot()
    ;; This example sends a plot of the current drawing
    ;; to a file.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    ;; Set a device current that outputs to a file
    (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWF6 ePlot.pc3")

    ;; Define the plot variable
    (setq currentPlot (vla-get-Plot doc))
    
    ;; Define the output file name.
    ;; Use "" to use the drawing name as the file name.
    ;; Note: if the file name exists an error will be generated.
    (setq plotFileName "MyPlot")

    (vla-PlotToFile currentPlot plotFileName)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 14:38

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部