CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2019 开发者帮助

DimLineSuppress 属性 (ActiveX)

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

DimLineSuppress 属性 (ActiveX)

指定禁止显示径向尺寸的尺寸线。

支持的平台:仅限 Windows

签名

VBA:

object.DimLineSuppress
对象

类型:DimRadialDimRadialLarge

此属性应用于的对象。

属性值

只读:

类型:布尔

  • True:隐含尺寸线。
  • False:不要隐含尺寸线。

言论

此属性的初始值为 。False

当此属性设置为 时,将禁止显示扩展线和文本之间的尺寸线和箭头。True

注意:此属性将重写 DIMSD2 系统变量的值。

例子

VBA:

Sub Example_DimLineSuppress()
   ' This example creates a Radial Dimension in model space and
   ' uses the DimLineSuppress property to toggle the display
   ' of the dimension lines

    Dim dimObj As AcadDimRadial
    Dim center(0 To 2) As Double
    Dim chordPoint(0 To 2) As Double
    Dim leaderLen As Integer
    
    ' Define the dimension
    center(0) = 0: center(1) = 0: center(2) = 0
    chordPoint(0) = 5: chordPoint(1) = 5: chordPoint(2) = 0
    leaderLen = 5
    
    ' Create the radial dimension in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimRadial(center, chordPoint, leaderLen)
    ThisDrawing.Application.ZoomAll
    
    MsgBox "The radial dimension has been created.", vbInformation
    
    dimObj.DimLineSuppress = Not (dimObj.DimLineSuppress)
    ThisDrawing.Application.ZoomAll
    
    MsgBox "The radial dimension appearance has been modified.", vbInformation
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_DimLineSuppress()
    ;; This example creates a Radial Dimension in model space and
    ;; uses the DimLineSuppress property to toggle the display
    ;; of the dimension lines
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    ;; Define the dimension
    (setq center (vlax-3d-point 0 0 0)
          chordPoint (vlax-3d-point 5 5 0)
          leaderLen 5)
    
    ;; Create the radial dimension in model space
    (setq modelSpace (vla-get-ModelSpace doc))  
    (setq dimObj (vla-AddDimRadial modelSpace center chordPoint leaderLen))
    (vla-ZoomAll acadObj)

    (alert "The radial dimension has been created.")
    
    (vla-put-DimLineSuppress dimObj (if (= (vla-get-DimLineSuppress dimObj) :vlax-true) :vlax-false :vlax-true))
    (vla-ZoomAll acadObj)
    
    (alert "The radial dimension appearance has been modified.")
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2025-3-14 07:54

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部