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 ) );
}