BuildingCoder.CmdCollectorPerformance.GetAllModelElements C# (CSharp) Method

GetAllModelElements() private method

Return all model elements, cf. http://forums.autodesk.com/t5/revit-api/traverse-all-model-elements-in-a-project-top-down-approach/m-p/5815247
private GetAllModelElements ( Document doc ) : IEnumerable
doc Document
return IEnumerable
        IEnumerable<Element> GetAllModelElements(
            Document doc)
        {
            Options opt = new Options();

              return new FilteredElementCollector( doc )
            .WhereElementIsNotElementType()
            .WhereElementIsViewIndependent()
            .Where<Element>( e
              => null != e.Category
              && null != e.get_Geometry( opt ) );
        }