AddLeader not working

I have a script that uses Rhino.AddLeader that has worked for many years. It now won’t add a leader to the document and the function returns Null.

The rest of the script works fine. I’ve also tested this with a single line script in a blank document and it also fails. Seems to be an issue with the latest update but I haven’t tried rolling back yet.

Test code:
obj = Rhino.AddLeader(Array(Array(0, 0, 0), Array(1, 1, 0), Array(2, 3, 0)))
If isNull(obj) Then Rhino.Print(“Could not create”)

Changing AddLeader to AddPolyline in the above works fine.
Running Rhino 6 SR22
(6.22.20021.10391)

Hi @jonathan3,

Your code seems to work here in an SR23 RC. So does this:

Option Explicit

Call Main()

Sub Main()
	
	Dim obj
	obj = Rhino.AddLeader(Array(Array(0, 0, 0), Array(1, 1, 0), Array(2, 3, 0)))
	If IsNull(obj) Then 
		Rhino.Print("Could not create leader")
	End If

End Sub

– Dale

Okay. I’ll check and see if there is something else going on here and/or wait for 23 to be released.

Thanks - Jonathan