CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

AutoCAD 2023 开发者帮助

LeaderLength 属性 (ActiveX)

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

LeaderLength 属性 (ActiveX)

指定引线在直径或半径尺寸上的长度。

支持的平台:仅限 Windows

签名

VBA:

object.LeaderLength
对象

类型:DimDiametricDimRadial

此属性应用于的对象。

属性值

只读:

类型:

领导者的长度。

言论

是从尺寸定义指向的距离,到尺寸将对注释文本进行水平狗腿的距离(如果不需要狗腿,则停止)。(有关详细信息,请参阅 or 方法。LeaderLengthChordPointAddDimDiametricAddDimRadial

注意:该设置将仅在创建维度期间使用。保存尺寸后,更改值不会影响尺寸的显示方式。该属性用于计算引线位置。该值不会保存,因此在读取时将始终返回零。LeaderLengthLeaderLengthLeaderLength

例子

VBA:

Sub Example_LeaderLength()
    ' This example creates a diametric dimension
    ' and returns the LeaderLength for that dimension.
    
    Dim dimObj As AcadDimDiametric
    Dim chordPoint(0 To 2) As Double
    Dim farChordPoint(0 To 2) As Double
    Dim leaderLength As Double
    
    ' Define the dimension
    chordPoint(0) = 5#: chordPoint(1) = 3#: chordPoint(2) = 0#
    farChordPoint(0) = 5#: farChordPoint(1) = 5#: farChordPoint(2) = 0#
    leaderLength = 1#
    
    ' Create the diametric dimension in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimDiametric(chordPoint, farChordPoint, leaderLength)
    ZoomAll
End Sub

可视化 LISP:

(vl-load-com)
(defun c:Example_LeaderLength()
    ;; This example creates a diametric dimension
    ;; and returns the LeaderLength for that dimension.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Define the dimension
    (setq chordPoint (vlax-3d-point 5 3 0)
          farChordPoint (vlax-3d-point 5 5 0)
          leaderLength 1)
    
    ;; Create the diametric dimension in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq dimObj (vla-AddDimDiametric modelSpace chordPoint farChordPoint leaderLength))
    (vla-ZoomAll acadObj)
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2025-3-14 06:48

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部