•public static ElementSet GetAllModelElements( Application app )
•{
•
ElementSet elems = app.Create.NewElementSet();
•
Geo.Options opt = app.Create.NewGeometryOptions(); // this is ok
•
ElementIterator iter = app.ActiveDocument.Elements;
•
while( iter.MoveNext() )
•
{
•
Autodesk.Revit.Element elem = iter.Current as Autodesk.Revit.Element;
•
if( !( elem is Symbol || elem is FamilyBase ) )
•
{
•
if( null != elem.Category )
•
{
•
if( null != elem.get_Geometry( opt ) )
•
{
• elems.Insert( elem );
•
}
•
}
•
}
•
}
•
return elems;
•}