Display 方法 (ActiveX)
打开或关闭 PViewport 对象的显示控件。 支持的平台:仅限 Windows 签名VBA: object.Display Status
返回值 (RetVal)无返回值。 言论显示控件必须处于打开状态,然后才能使用该属性激活模型空间编辑功能。MSpace 使用该属性可确定是否已使用此方法打开纸张空间视口显示。ViewportOn 例子VBA: Sub Example_DisplayMethod()
' This example creates a paper space viewport and makes it active.
Dim newPViewport As AcadPViewport
Dim centerPoint(0 To 2) As Double
Dim height As Double
Dim width As Double
height = 30#
width = 40#
centerPoint(0) = 30#: centerPoint(1) = 30#: centerPoint(2) = 0#
' Create a paper space Viewport object
ThisDrawing.ActiveSpace = acPaperSpace
Set newPViewport = ThisDrawing.PaperSpace.AddPViewport(centerPoint, width, height)
ZoomAll
newPViewport.Display True
' Before making a pViewport active,
' the mspace property needs to be True
ThisDrawing.mspace = True
ThisDrawing.ActivePViewport = newPViewport
End Sub
可视化 LISP: (vl-load-com)
(defun c:Example_DisplayMethod()
;; This example creates a paper space viewport and makes it active.
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq centerPoint (vlax-3d-point 30 30 0)
height 30
width 40)
;; Create a paper space Viewport object
(vla-put-ActiveSpace doc acPaperSpace)
(setq newPViewport (vla-AddPViewport (vla-get-PaperSpace doc) centerPoint width height))
(vla-ZoomAll acadObj)
(vla-Display newPViewport :vlax-true)
;; Before making a pViewport active,
;; the mspace property needs to be True
(vla-put-MSpace doc :vlax-true)
(vla-put-ActivePViewport doc newPViewport)
)
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-30 23:20
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.