InstanceObject.Explode strips user text from object attributes

This appears to be a problem in both Rhino 5 and 6 - Attributes-Attached User Text is missing - this same data is present in the InstanceDefinition.Objects() Attributes properties.

To reproduce, make a box, assign it attributes user text, make it into a block, and run the following C# script in grasshopper:

private void RunScript(object x, object y, ref object A, ref object B)
  {
    Rhino.DocObjects.InstanceObject block = RhinoDocument.Objects.OfType<Rhino.DocObjects.InstanceObject>().First();

    RhinoObject[] objs;
    ObjectAttributes[] atts;
    Transform[] xforms;
    block.Explode(true, out objs, out atts, out xforms);

    A = atts.SelectMany(a => a.GetUserStrings().AllKeys);
    B = block.InstanceDefinition.GetObjects().SelectMany(o => o.Attributes.GetUserStrings().AllKeys);

  }

You’ll see that the A output is empty, while the B output has the specified user string keys.

Hi @andheum,

I am able to repeat this - thanks for reporting.

https://mcneel.myjetbrains.com/youtrack/issue/RH-45162

For now, if you don’t care about nested instances, you can use RhinoObject.GetSubObjects.

– Dale

Hi @dale,
I can repeat the same bug on Rhino 6 after a year.
I noticed that Dale Lear commented on the youtrack issue:
Moving from 6.x to 7.0
Does this mean that the bug will not be fixed in Rhino 6?

Hi @djordje,

It does appear his way, yes. We’re trying to pivot to finishing Mac 6 and then focusing on Rhino 7. So unless it’s a fairly serious regression or crash bug, it probably won’t get worked on until v7.

– Dale

Thank you for the reply and clarification Dale.