PlotWithPlotStyles 属性 (ActiveX)
指定是否使用应用于对象并在打印样式表中定义的打印样式进行打印。 支持的平台:仅限 Windows 属性值只读:不 类型:布尔
言论该特性等效于 AutoCAD 中的“使用打印样式打印”选项。PlotWithPlotStyles 例子VBA: 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
可视化 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)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 12:23
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.