Any way to access geometry of linked blocks?

Hi,
I am trying to access the geometry of a linked block in a GH component.

The following code with embed block in a GH component is working fine.

var meshList = new List<Mesh>();
var name = "myblock";
var idef= doc.InstanceDefinitions.Find(name);
var bkObj = bk.GetObjects();

for (int i = 0; i < bkObj.Count(); i++)
{
  if (bkObj[i].ObjectType == ObjectType.Mesh){meshList.Add((Mesh) bkObj[i].DuplicateGeometry());}
}
A = meshList;

However when it comes to linked blocks, GetObjects method doesn’t return any geometry…
Any idea?

Note that I am not looking at baking geometry using AddInstanceObject method.

thx

Hi @taitam,

This sample seems to work with linked instance definitions:

https://github.com/mcneel/rhino-developer-samples/blob/6/rhinocommon/cs/SampleCsCommands/SampleCsDumpBlockTree.cs

– Dale