Getting "Referenced object" into Grasshopper from Rhino

I’m having one of those days where I have no idea of what I’m doing… :confused:
I want to get the objects as “Referenced” as in the blue panel), but using the code below I’m getting the outputs in the orange panel.

I just need someone to push me in the right direction…

elements = RhinoDocument.Objects.GetSelectedObjects(false, false);

You’ll need to construct the right type of goo with the reference id… lot of work. Just use one of the methods in GH_Convert:

var objects = new List<IGH_Goo>();
foreach (RhinoObject obj in RhinoDocument.Objects.GetSelectedObjects(false, false))
{
  var refobj = new ObjRef(obj);
  var goo = Grasshopper.Kernel.GH_Convert.ObjRefToGeometry(refobj);
  objects.Add(goo);
}
A = objects;

Okay so at least I was barking up the right tree when I was looking at GH_Convert and ObjRefToGeometry… Missed the intermediate step…

Thanks for the help, I owe your a beer!