Hi everyone!
I am facing following issue:
We are referencing nested block instances by name (using EleFront RefBlock) and need to get the information, which parent block owns that particular nested instance.
I can not use rs.BlockContainers(BlockName) because that only lists names of all block definitions that contain nested instance’s definition without any connection to their occurrences in Rhino model space, not exposing the guids or anything, so there apparently is no way to match each referenced nested instance with corresponding parent instance.
The reason we need to do it is that we need to inherit some user strings from top-level parent.
In ideal state there would be method similar to rs.BlockContainers, that would instead of name return a guid of the topmost block that owns the particular nested instance.
The nested instance’s object type is InstanceReferenceGeometry, for which I did not find anything in RhinoCommon that would do the thing.
Basically, with EleFront I am able to reference nested block like this…
…and need to get guid of an instance that owns it like this
However, I fear that there is a problem with it - is the main obstacle that the nested blocks do not get unique guid per each occurrence, and it is only the topmost block in the model that actually gets unique guid per occurrence? I suspect that EleFront uses some tricks to get the nested instances. It is not possible to read their guid - 'cause they do not have it (they only have instance definition guid, but not guid for each nested instance)
That way you can’t even give our imaginary method any unique identifier of the nested instance to find the parent for. Is this assumption correct? Meaning that there is not any way to connect the top-level parent instance in Rhino model space with its referenced content?
If any of you knew anything about this matter, I will appreciate any input.
Have a great day!