Accessing or copying content from an xref

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?

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

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.

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

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

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

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

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.

Sort by key is your friend.

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