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
Block Collection : AddLeader Method |
Description
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
Value Description vicLineNoArrow The leader is a line and does not display an arrow. vicLineWithArrow The leader is a line with an arrow displayed, if one is assigned. vicSplineNoArrow The leader is a spline and does not display an arrow. vicSplineWithArrow The leader is a spline with an arrow displayed, if one is available.
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