Revit Crashes with - FilteredElementCollector Constructor (Document, ElementId, ElementId)

Hello All,

Has anyone tried using FilteredElementCollector Constructor (Document, ElementId, ElementId)? It causes my Revit session to crash with a message ‘Exception Processing Message 0xc00000005 - Unexpected Parameters.
Has anyone experienced the same? Any solution found?

Please advise.

If you want the community to advise you, please share what you are doing, else how are we to advise you?

I have played around and found a solution that works in my script - when I use this fec for iteration, I switch active view. So, to get elements from Revit link for a view-A, I set view-A to be the active view. Then switch to view-B, view-C, etc.