Get linked geometry of multiple linked models

@kike @Japhy

Further to this post, if I have multiple linked models (which may be on BIM360), what is the best way to reference these elements and get their geometry?

Normally, I would use this method. But it is not scalable and components have to be copied multiple times if there are multiple linked model. Also not sure if this will work with BIM360.

The document links component returns a document, not a Revit link instance so not sure how to use it.

And getting element view geometry doesn’t return anything from a linked model.

Suggestions?

Try

image

@Japhy @kike
That only returns documents, not geometry.

If for example, I use a visibility filter with Query elements, it doesn’t return the geometry, just two random graphic styles…

Thanks for the files, that helps.

The only thing i did different was to de-centralized Building A & discard worksets

OK but that is not an option. I can’t discard worksets. Why would this be an issue? It hasn’t in the past.

Also, I need to get all elements in the view, not just walls.

Tomorrow i’ll open fresh and re-centralize and see if i can come up with anything.

I didn’t look too far but it appears you can’t get linked elements via the view filters, instead they recommend doing an intersect

It is not possible to create a filtered element collector where the document being filtered is a linked document, but the view being filtered is in the main document.

@Japhy any resolution to this?

Hi Paul, Everything is working as expected. The issue of not filtering the view is due to Revit API limitations on linked documents.

@Japhy I’m not sure why you are saying everything is working as expected as we don’t have a resolution yet.

Graphic elements is failing and de-centralising models is not an option.

Plus, my original question hasn’t been answered. That is, how can I get the geometry of linked elements in a view? If view filtering is an API limitation, what is the alternative?

For example, I could maybe do something like this, but I need to know what categories are visible in the active view rather than specifying a single category. Is this possible?

Not sure if this will even work as there may be multiple instances of the same document.

@kike mentioned design option visibility wasn’t available via the API so is this the same for category visibility?

You can query linked elements by category, but they don’t relate to the host view visibility. The recommendation that i’ve seen so far is to intersect/bounding box filter, although i haven’t had time to read through all the links here yet…

If I use a phase filter it returns all of the elements but then I would need to filter by category. Is there any easy way to select multiple categories (or even reference from a view template)?

Using a bounding box filter is only working on one of the linked files. I suspect it is because the bounding box doesn’t intersect Building B because of a different coordinate system. Not sure how this can be fixed.

Selecting the appropriate Categories and Union Filters seems applicable, if you know the categories ahead of time.

Or use the Elements coming out of the Phase Filter to create a Set of Categories more dynamically, if i’m understanding you correctly.