CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2024 开发者帮助

ShadePlot 属性 (ActiveX)

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

ShadePlot 属性 (ActiveX)

指定视口的着色视口打印模式。

支持的平台:仅限 Windows

签名

VBA:

object.ShadePlot
对象

类型: PViewport

此属性应用于的对象。

属性值

只读:

类型:枚举AcShadePlot

  • acShadePlotAsDisplayed:模型空间视图的绘图方式与显示方式相同。
  • acShadePlotHidden:删除隐藏线的模型空间视图图,无论显示方式如何。
  • acShadePlotRendered:模型空间视图绘图为渲染,而不考虑显示方式。
  • acShadePlotWireframe:模型空间视图以线框形式绘制,而不考虑显示方式。

言论

没有其他评论。

例子

VBA:

Sub Example_ShadePlot()
    ' This example creates a paper space viewport,
    ' makes it active, and then sets it to plot as displayed.
    
    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
    ThisDrawing.MSpace = True

    ' Set the viewport to plot as displayed
    ThisDrawing.ActivePViewport = newPViewport
    newPViewport.ShadePlot = acShadePlotAsDisplayed
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_ShadePlot()
    ;; This example creates a paper space viewport,
    ;; makes it active, and then sets it to plot as displayed.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (setq centerPoint (vlax-3d-point 30 30 0)
          width 40
          height 40)
    
    ;; Create a paper space Viewport object
    (vla-put-ActiveSpace doc acPaperSpace)

    (setq paperSpace (vla-get-PaperSpace doc))
    (setq newPViewport (vla-AddPViewport paperSpace centerPoint width height))

    (vla-ZoomAll acadObj)
    (vla-Display newPViewport :vlax-true)
    (vla-put-MSpace doc :vlax-true)

    ;; Set the viewport to plot as displayed
    (vla-put-ActivePViewport doc newPViewport)
    (vla-put-ShadePlot newPViewport acShadePlotAsDisplayed)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-12-15 22:20

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部