void DistinguishRoomsDraft(
Document doc,
ref StringBuilder sb,
ref int numErr,
ref int numWarn)
{
FilteredElementCollector rooms
= new FilteredElementCollector( doc );
rooms.WherePasses( new RoomFilter() );
foreach( Room r in rooms )
{
sb.AppendFormat( "\r\n Room {0}:'{1}': ",
r.Id.ToString(), r.Name );
if( r.Area > 0 ) // OK if having Area
{
sb.AppendFormat( "OK (A={0}[ft3])", r.Area );
}
else if( null == r.Location ) // Unplaced if no Location
{
sb.AppendFormat( "UnPlaced (Location is null)" );
}
else
{
sb.AppendFormat( "NotEnclosed or Redundant "
+ "- how to distinguish?" );
}
}
}