IntelliCAD 11.1 Object Library
AddLeader Method
See Also 
Points
A collection of points defining the leader line.
Annotation
Text to display with the leader.
Type
ModelSpace Collection : AddLeader Method

Description

Adds a leader line, given the coordinates of the points and Annotation object.

Syntax

Visual Basic
Public Function AddLeader( _
   ByVal Points As Points, _
   Optional ByVal Annotation As Variant = 0, _
   Optional ByVal Type As LeaderType = vicLineNoArrow _
) As Leader

Parameters

Points
A collection of points defining the leader line.
Annotation
Text to display with the leader.
Type
ValueDescription
vicLineNoArrowThe leader is a line and does not display an arrow.
vicLineWithArrowThe leader is a line with an arrow displayed, if one is assigned.
vicSplineNoArrowThe leader is a spline and does not display an arrow.
vicSplineWithArrowThe leader is a spline with an arrow displayed, if one is available.

Example

Private Sub Leader_Example()

' This example adds a point entity to the drawing using the AddLeader

' method. A type 2 leader (line w/ arrow is used).

 

     Dim myDoc As IntelliCAD.Document

     Dim myLeader As Leader

     Dim myPoints As Points

     Dim pt As Point

     Set myDoc = ActiveDocument

     Set myPoints = Library.CreatePoints

     Set pt = Library.CreatePoint(1, 3, 0)

     myPoints.Add

     myPoints(myPoints.Count - 1).x = pt.x

     myPoints(myPoints.Count - 1).y = pt.y

     myPoints(myPoints.Count - 1).z = pt.z

     Set pt = Library.CreatePoint(3, 4, 0)

     myPoints.Add

     myPoints(myPoints.Count - 1).x = pt.x

     myPoints(myPoints.Count - 1).y = pt.y

     myPoints(myPoints.Count - 1).z = pt.z

     Set myLeader = ThisDocument.ModelSpace.AddLeader(myPoints, "testldr", 2)

     myLeader.Update

End Sub

See Also

© 2022 IntelliCAD Technology Consortium. All Rights Reserved.