V6 RhinoScript’s Rhino.BlockInstances returns Null instead of an array when the block definition names have more than 64 characters. V5 doesn’t have this limitation.
RhinoScript_BlockInstances.3dm (67.0 KB)
Option Explicit
Call Main()
Sub Main()
Dim strUserSelBlockInst
strUserSelBlockInst = Rhino.GetObject("Select block instance", 4096, True)
If IsNull(strUserSelBlockInst) Then Exit Sub
Dim strBlockDefName, arrBlockInstances
strBlockDefName = Rhino.BlockInstanceName(strUserSelBlockInst)
Rhino.Print strBlockDefName
arrBlockInstances = Rhino.BlockInstances(strBlockDefName)
If IsNull(arrBlockInstances) Then Rhino.Print("arrBlockInstances is Null.")
If IsArray(arrBlockInstances) Then Rhino.Print("arrBlockInstances is an array.")
End Sub
Thank you,
Steve