# Any way to access geometry of linked blocks?

**URL:** <https://discourse.mcneel.com/t/any-way-to-access-geometry-of-linked-blocks/80514>\
**Category:** Rhino Developer\
**Created:** [March 19, 2019, 8:47am UTC](https://discourse.mcneel.com/t/any-way-to-access-geometry-of-linked-blocks/80514 "2019-03-19T08:47:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taitam](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/taitam/32/141765_2.png) [@taitam](https://discourse.mcneel.com/u/taitam)\
**Post date:** [March 19, 2019, 8:47am UTC](https://discourse.mcneel.com/t/any-way-to-access-geometry-of-linked-blocks/80514/1 "2019-03-19T08:47:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [March 19, 2019, 10:27pm UTC](https://discourse.mcneel.com/t/any-way-to-access-geometry-of-linked-blocks/80514/2 "2019-03-19T22:27:25Z")

</div>

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](https://github.com/mcneel/rhino-developer-samples/blob/6/rhinocommon/cs/SampleCsCommands/SampleCsDumpBlockTree.cs)

– Dale
