指定在打印过程中是否隐藏对象。 支持的平台:仅窗口 属性值只读:不 类型:布尔
言论此属性指定是否通过隐藏线算法处理图纸空间中的对象。请注意,此属性不会影响浮动模型空间视口内的对象。 例子工 务 局: 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) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:44
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.