| AddLeaderLine 方法 (ActiveX) 将引线添加到具有指定索引的引线集群。 支持的平台:仅限 Windows 签名VBA: RetVal = object.AddLeaderLine(leaderIndex, pointArray) 
 返回值 (RetVal)类型:长 添加的引线的索引。 言论没有其他评论。 例子VBA: Sub Example_MLeaderLine()
    Dim oML As AcadMLeader
    Dim points(0 To 5) As Double
    points(0) = 1: points(1) = 1: points(2) = 0
    points(3) = 4: points(4) = 4: points(5) = 0
    Dim i As Long
    Set oML = ThisDrawing.ModelSpace.AddMLeader(points, i)
    Dim r As Long
    r = oML.AddLeader()
    points(4) = 10
    Call oML.AddLeaderLine(r, points)
    MsgBox "LeaderCount = " & oML.LeaderCount
    ZoomExtents
End Sub可视化 LISP: (vl-load-com)
(defun c:Example_MLeaderLine()
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    (setq points (vlax-make-safearray vlax-vbDouble '(0 . 5)))
    (vlax-safearray-fill points '(1 1 0
                                  4 4 0
				                             )
    )  
    (setq i 0)
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq oML (vla-AddMLeader modelSpace points i))
    (setq r (vla-AddLeader oML))
    (vlax-safearray-put-element points 4 10)
    (vla-AddLeaderLine oML r points)
    (alert (strcat "LeaderCount = " (itoa (vla-get-LeaderCount oML))))
    (vla-ZoomExtents acadObj)
) | 
 |Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1   苏公网安备32011402011833)
GMT+8, 2025-10-31 14:08
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.