When a block instance in Rhino is referenced in a GH component it results in a Referenced Block Instance, but when this is passed through any of the components treating Rhino Objects it is converted into a Model Block Instance. I’ve tried to access blocks in C#, but I could not find a way to convert a Referenced Block Instance (which points me to the Block definition, not the instance itself) into a Model Block Instance, without going through one of the other components (see picture below). I need to access the Model Block Instance to have also access to its geometries and associated User Text.
Another thing I need this for is to access nested blocks and their associated User Text in C#; of course, if someone already knows a way to do this and is inclined to share I’d be very grateful.
This is only a tentative approach as I could not find a suitable example. Here attached is a basic example to play with.
Maybe I need to work on my wording, but what I would like to know is precisely how to convert a Reference Block into a Model Block in C# in order to access its Geometry and User Text for nested blocks as well (and do all of this in C#). I know how to do this with standard components, but I want to do that in C#.
Yes, in the example Rhino file I attached there was no User Text associated to the block. Here’s an updated version with User Text associated.