CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

PlotWithPlotStyles Property (ActiveX)

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

摘要: 指定是否使用应用于对象并在打印样式表中定义的打印样式进行打印。

指定是否使用应用于对象并在打印样式表中定义的打印样式进行打印。

支持的平台:仅窗口

签名

工 务 局:

object.PlotWithPlotStyles
对象

类型:布局绘图配置

此属性适用的对象。

属性值

只读:

类型:布尔

  • True:打印时使用应用于对象的打印样式。
  • False:打印时不要使用应用于对象的打印样式。

言论

该属性等效于 AutoCAD 中的“使用打印样式打印”选项。PlotWithPlotStyles

例子

工 务 局:

Sub Example_PlotWithPlotStyles()
    ' This example reads and changes the PlotWithPlotStyles
    ' value, and shows a plot preview so the user can see the change.
    
    Dim ACADLayout As ACADLayout
    Dim originalValue As Boolean
    
    ' Get the layout object
    Set ACADLayout = ThisDrawing.ActiveLayout
    
    ' Read and display the original value
    originalValue = ACADLayout.PlotWithPlotStyles
    MsgBox "The PlotWithPlotStyles value is set to: " & originalValue

    ' Modify the PlotWithPlotStyles preference by changing the value
    ACADLayout.PlotWithPlotStyles = Not ACADLayout.PlotWithPlotStyles
    MsgBox "The PlotWithPlotStyles preference has been set to: " & ACADLayout.PlotWithPlotStyles

    ThisDrawing.ActiveLayout.ConfigName = "DWF6 ePlot.pc3"
    
    'Show plot preview
    ThisDrawing.Plot.DisplayPlotPreview acFullPreview

End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PlotWithPlotStyles()
    ;; This example reads and changes the PlotWithPlotStyles
    ;; value, and shows a plot preview so the user can see the change.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Get the layout object
    (setq ACADLayout (vla-get-ActiveLayout doc))
    
    ;; Read and display the original value
    (setq originalValue (vla-get-PlotWithPlotStyles ACADLayout))
    (alert (strcat "The PlotWithPlotStyles value is set to: " (if (= originalValue :vlax-true) "True" "False")))

    ;; Modify the PlotWithPlotStyles preference by changing the value
    (vla-put-PlotWithPlotStyles ACADLayout (if (= originalValue :vlax-true) :vlax-false :vlax-true))
    (setq newValue (vla-get-PlotWithPlotStyles ACADLayout))
    (alert (strcat "The PlotWithPlotStyles preference has been set to: " (if (= newValue :vlax-true) "True" "False")))

    ;; Set an output device current
    (if (= (strcase (vla-get-ConfigName (vla-get-ActiveLayout doc))) "NONE")
        (vla-put-ConfigName (vla-get-ActiveLayout doc) "DWF6 ePlot.pc3")
    )

    ;; Show plot preview
    (vla-DisplayPlotPreview (vla-get-Plot doc) acFullPreview)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-12 14:57

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部