InstanceDefinition.IsReference outputs "null" instead of "True" for referenced blocks

InstanceDefinition.IsReference outputs “null” instead of “True” for referenced blocks ; well, at least in this script :

It does a good job in my tests, but why output nulls ?

Could a stupid newbie like me have found a bug in RhinoCommon ?

Categorized.
Please assign your new messages to the appropriate category.
Thanks

whoopsie-daisy…

Looks like def == null is true so it returns nothing. Some named block is not found.

Makes sense…kind of.
The RhinoDocument.Definition.Find method returns null because…those blocks names are not part of the active document, which is what I’m trying to assess.
So it kind of does the job anyway…

But this means that referenced documents are outside the scope of “RhinoDocument”.
The Elefront component “List Block Documents” manages to get the names of the active + the referenced document.
I wonder how they do that…

not sure if it is legal,but in theory you could decompile a plug in using something like ilspy.