ElementIntersectsElementFilter is not working for Lineked documents elements.

ElementIntersectsElementFilter is not working for Lineked documents elements.

s04049
Enthusiast Enthusiast
437 Views
1 Reply
Message 1 of 2

ElementIntersectsElementFilter is not working for Lineked documents elements.

s04049
Enthusiast
Enthusiast

Hi

I am trying to find the intersect element between the selected element with the link file element.

When running the [Current_document] with [Current_document_element]

FilteredElementCollector(Current_document)

everything is fine.

 

However running the [Link_document] with [Current_document_element]

FilteredElementCollector(Link_document)

nothing filters to result from the list

List<Element> resultele = new FilteredElementCollector(Link_document).WhereElementIsNotElementType().WherePasses(new ElementIntersectsElementFilter(Current_doc_element)).ToList();

 

I found this post on forums that says this is a software glitch.

I try to run on 2023 and 2021 and still get the same result.

https://forums.autodesk.com/t5/revit-api-forum/elementintersectselementfilter-is-not-working-for-lin...

 

thanks for any help

0 Likes
Accepted solutions (1)
438 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni
Accepted solution

I am unsure whether you can run an ElementIntersectsElementFilter to directly analyse the current document with a linked document.  Afaik, a filtered element collector can only work in one document at a time.  If you are interested in a limited set of elements in either one of the two documents, you can retrieve their solid geometry, transform it to the other document coordinate space and use a ElementIntersectsSolidFilter on that instead.   

 

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open