ElementIntersectElementFilter

ElementIntersectElementFilter

Anonymous
Not applicable
312 Views
1 Reply
Message 1 of 2

ElementIntersectElementFilter

Anonymous
Not applicable

Is it possible to use ElementIntersectElementFilter between Parts and Generic Models?

I'm using the code below but I keep getting 0 elements in my collector even if invert the ElementIntersectElementFilter.

 

UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;

Selection selsrc=uiApp.ActiveUIDocument.Selection;
Reference obj = selSrc.PickObject(ObjectType.Element);
Element element = doc.GetElement(obj);

 

FilteredElementCollector collector = new FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Parts).WherePasses(new ElementIntersectsElementFilter(element));

 

Thank you.

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

jeremytammik
Autodesk
Autodesk
Accepted solution

This is a duplicate of your previous ideantical thread:

 

http://forums.autodesk.com/t5/revit-api-forum/elementintersectelementfilter/m-p/6751980

 

Please avoid producing multiple identical threads.

 

Please let us continue the discussion in the other one.

 

Thank you!

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes