指定是否在图形中显示打印样式和打印样式名称。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论该属性等效于 AutoCAD 中的“显示打印样式”选项。ShowPlotStyles 例子工 务 局: Sub Example_ShowPlotStyles() ' This example reads and modifies the ShowPlotStyles ' value, and then regenerates all viewports. Dim ACADLayout As ACADLayout Dim originalValue As Boolean ' Get the layout object Set ACADLayout = ThisDrawing.ActiveLayout ' Read and display the original value originalValue = ACADLayout.ShowPlotStyles MsgBox "The ShowPlotStyles value is set to: " & originalValue ' Modify the ShowPlotStyles preference by changing the value ACADLayout.ShowPlotStyles = Not ACADLayout.ShowPlotStyles MsgBox "The ShowPlotStyles value has been set to: " & ACADLayout.ShowPlotStyles ' Regenerate viewports ThisDrawing.Regen acAllViewports End Sub Visual LISP: (vl-load-com) (defun c:Example_ShowPlotStyles() ;; This example reads and modifies the ShowPlotStyles ;; value, and then regenerates all viewports. (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-ShowPlotStyles ACADLayout)) (alert (strcat "The ShowPlotStyles value is set to: " (if (= originalValue :vlax-true) "True" "False"))) ;; Modify the ShowPlotStyles preference by changing the value (vla-put-ShowPlotStyles ACADLayout (if (= originalValue :vlax-true) :vlax-false :vlax-true)) (alert (strcat "The ShowPlotStyles value has been set to: " (if (= (vla-get-ShowPlotStyles ACADLayout) :vlax-true) "True" "False"))) ;; Regenerate viewports (vla-Regen doc acAllViewports) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:39
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.