CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

PlotHidden Property (ActiveX)

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

摘要: 指定在打印过程中是否隐藏对象。

指定在打印过程中是否隐藏对象。

支持的平台:仅窗口

签名

工 务 局:

object.PlotHidden
对象

类型:布局绘图配置

此属性适用的对象。

属性值

只读:

类型:布尔

  • True:在绘图过程中隐藏对象。
  • False:打印过程中不要隐藏物体。

言论

此属性指定是否通过隐藏线算法处理图纸空间中的对象。请注意,此属性不会影响浮动模型空间视口内的对象。

例子

工 务 局:

Sub Example_PlotHidden()
    ' This example will access the Layouts collection for the current drawing
    ' and display whether the objects for each layout are to be hidden during a plot.
    ' It will then toggle the state of PlotHidden for "Layout1" and re-display the
    ' PlotHidden state for each Layout.

    Dim Layouts As AcadLayouts, Layout As ACADLayout
    Dim msg As String
    Dim IsHidden As String
    
    ' Get layouts collection from document object
    Set Layouts = ThisDrawing.Layouts
    
    ' Display current hidden information
    GoSub DISPLAY
    
    ' Toggle object hidden state for Layout1
    Layouts("Layout1").PlotHidden = Not (Layouts("Layout1").PlotHidden)
    
    ' Display new hidden information
    GoSub DISPLAY
    
    Exit Sub
    
DISPLAY:
    msg = ""    ' Clear message
    
    ' Determine whether the objects for each layout are hidden during a plot
    For Each Layout In Layouts
        ' Are these objects hidden?
        IsHidden = IIf(Layout.PlotHidden, " are hidden ", " are not hidden ")
        
        ' Format for display
        msg = msg & "Objects for " & Layout.name & IsHidden & "during a plot." & vbCrLf
    Next
    
    ' Display layout information
    MsgBox msg
    
    Return
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PlotHidden()
    ;; This example will access the Layouts collection for the current drawing
    ;; and display whether the objects for each layout are to be hidden during a plot.
    ;; It will then toggle the state of PlotHidden for "Layout1" and re-display the
    ;; PlotHidden state for each Layout.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Get layouts collection from document object
    (setq Layouts (vla-get-Layouts doc))
    
    ;; Display current hidden information
    (setq msg "")
    
    ;; Determine whether the objects for each layout are hidden during a plot
    (vlax-for Layout Layouts
        ;; Are these objects hidden?
        (setq IsHidden (if (= (vla-get-PlotHidden Layout) :vlax-true) " are hidden " " are not hidden "))
        
        ;; Format for display
        (setq msg (strcat msg "Objects for " (vla-get-Name Layout) IsHidden "during a plot.\n"))
    )
    
    ;; Display layout information
    (alert msg)
    
    ;; Toggle object hidden state for Layout1
    (vla-put-PlotHidden (vla-item Layouts "Layout1") (if (= (vla-get-PlotHidden (vla-item Layouts "Layout1")) :vlax-true) :vlax-false :vlax-true))
    
    ;; Display new hidden information
    (setq msg "")
    
    ;; Determine whether the objects for each layout are hidden during a plot
    (vlax-for Layout Layouts
        ;; Are these objects hidden?
        (setq IsHidden (if (= (vla-get-PlotHidden Layout) :vlax-true) " are hidden " " are not hidden "))
        
        ;; Format for display
        (setq msg (strcat msg "Objects for " (vla-get-Name Layout) IsHidden "during a plot.\n"))
    )
    
    ;; Display layout information
    (alert msg)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 13:55

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部