# Accessing or copying content from an xref

**URL:** <https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932>\
**Category:** Civil 3D\
**Created:** [March 20, 2025, 8:03pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932 "2025-03-20T20:03:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdammReilly](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/adammreilly/32/95902_2.png) [@AdammReilly](https://forum.dynamobim.com/u/AdammReilly)\
**Post date:** [March 20, 2025, 8:03pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/1 "2025-03-20T20:03:19Z")

</div>

I am working in a file that houses my storm sewer pipe network and I want to bring in my drainage area map xref to create my catchments from. I have a new process for converting that data to catchments and linking those the structures to those catchments, but I want to bridge the gap of having that data in two separate files.  
I’ve played around with the Xref nodes, but I don’t see any way to get a Document object from one. I think that’s the logical step to get the content from it. @zachri.jensen is that something you or the team have already looked into?  
Or, is there a different method or thought process that I am missing?

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [March 20, 2025, 8:25pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/2 "2025-03-20T20:25:50Z")

</div>

An xref is basically just a block reference with some fancy decorations on top 🙂

So, you can use `BlockReference.Block` to get the block definition of the xref, then get whatever you want from there. For example, you can use the `All Objects of Type` node and plug in the xref block into the `block` input. Then you are retrieving the objects from the xref instead of from model space of the current document.

If you’re wanting to get the data from the drainage area map DWG without it actually being added to the current DWG as an xref, then it becomes a much different challenge.

---

<div class="post-metadata">

**Author:** ![AdammReilly](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/adammreilly/32/95902_2.png) [@AdammReilly](https://forum.dynamobim.com/u/AdammReilly)\
**Post date:** [March 20, 2025, 9:26pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/3 "2025-03-20T21:26:39Z")

</div>

Thanks. With that perspective, I can get to the parcels, but you’re right, now I have an issue with actually using them.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/5/a5788f983804d17948b0fe78dd41d6f5e1991ea9.png)

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [March 20, 2025, 9:32pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/4 "2025-03-20T21:32:17Z")

</div>

Hmm…that should work. Silly question, but are you sure you ran the graph after hooking everything up? 🙂

---

<div class="post-metadata">

**Author:** ![AdammReilly](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/adammreilly/32/95902_2.png) [@AdammReilly](https://forum.dynamobim.com/u/AdammReilly)\
**Post date:** [March 20, 2025, 9:36pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/5 "2025-03-20T21:36:09Z")

</div>

lol, I did not. I forgot this file was on manual 😃  
Thanks for pointing that out

---

<div class="post-metadata">

**Author:** ![AdammReilly](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/adammreilly/32/95902_2.png) [@AdammReilly](https://forum.dynamobim.com/u/AdammReilly)\
**Post date:** [March 20, 2025, 9:48pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/6 "2025-03-20T21:48:25Z")

</div>

Even with that, now I’m having issues with this sort function 😕  
List.Sort returns a list, although nothing is actually done. The List.SortByFunction just returns null.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/0/20a5ebceead4f19c61c37df8e7bd1665ba9c2ed5.png)

But if I just skip past that, I can still create my catchments, so I guess I don’t need the sort at this stage. I’ll take that as a win.

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [March 20, 2025, 10:02pm UTC](https://forum.dynamobim.com/t/accessing-or-copying-content-from-an-xref/108932/7 "2025-03-20T22:02:04Z")

</div>

Sort by key is your friend.

I wrote a blog about that issue. It is in Dutch but there is translate button on top.

> **[Lijsten sorteren in Civil3D Dynamo](https://blog.huiz.net/2025/01/11/lijsten-sorteren-in-civil3d-dynamo/)**
>
> Veel nodes in Dynamo sorteren niet automatisch de waarden die geretourneerd worden. Bijvoorbeeld laagnamen worden geretourneerd in de volgorde zoals ze zijn aangemaakt. Een beetje programmeur sorteert eerst het resultaat, maar dat heeft de...
