CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2020 开发者帮助

PlotViewportsFirst 属性 (ActiveX)

2024-5-18 18:22| 发布者: admin| 查看: 69| 评论: 0|原作者: admin|来自: AutoCAD

PlotViewportsFirst 属性 (ActiveX)

指定是否首先打印图纸空间视口中的所有几何图形。

支持的平台:仅限 Windows

签名

VBA:

object.PlotViewportsFirst
对象

类型:布局PlotConfiguration

此属性应用于的对象。

属性值

只读:

类型:布尔

  • True:首先绘制图纸空间视口中的几何图形,最后绘制图纸空间中的几何图形。
  • False:首先绘制纸张空间几何图形,最后绘制纸张空间视口中的几何图形。

言论

没有其他评论。

例子

VBA:

Sub Example_PlotViewportsFirst()
    ' This example reads and modifies the PlotViewportsFirst
    ' Layout value.
    ' When finished, this example resets the  value back to
    ' its original value.
    
    Dim ACADLayout As ACADLayout
    Dim originalValue As Boolean
    
    ' Get the layout object
    Set ACADLayout = ThisDrawing.ActiveLayout
    
    ' Read and display the original value
    originalValue = ACADLayout.PlotViewportsFirst
    MsgBox "The PlotViewportsFirst value is set to: " & originalValue

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

    ' Reset the preference back to its original value
    ACADLayout.PlotViewportsFirst = originalValue
    MsgBox "The PlotViewportsFirst preference was reset back to: " & originalValue
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_PlotViewportsFirst()
    ;; This example reads and modifies the PlotViewportsFirst
    ;; Layout value.
    ;; When finished, this example resets the  value back to
    ;; its original value.
    (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-PlotViewportsFirst ACADLayout))
    (alert (strcat "The PlotViewportsFirst value is set to: " (if (= originalValue :vlax-true) "True" "False")))

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

    ;; Reset the preference back to its original value
    (vla-put-PlotViewportsFirst ACADLayout originalValue)
    (alert (strcat "The PlotViewportsFirst preference was reset back to: " (if (= originalValue :vlax-true) "True" "False")))
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-12-15 12:52

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部