AddLeader Example

Using Programming Languages other than VBA

Sub Example_AddLeader()
	' This example creates a leader in model space.
	' The leader is not attached to any annotation object
	' in this example.
   
	Dim leaderObj As AcadLeader
	Dim points(0 To 8) As Double
	Dim leaderType As Integer
	Dim annotationObject As AcadObject

	points(0) = 0: points(1) = 0: points(2) = 0
	points(3) = 4: points(4) = 4: points(5) = 0
	points(6) = 4: points(7) = 5: points(8) = 0
	leaderType = acLineWithArrow
	Set annotationObject = Nothing
	
	' Create the leader object in model space
	Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType)
	ZoomAll

End Sub

 

   Comments?