BuildingCoder.CmdListAllRooms.DistinguishRoomsDraft C# (CSharp) Méthode

DistinguishRoomsDraft() public méthode

Draft for method to distinguish 'Not Placed', 'Redundant' and 'Not Enclosed' rooms.
public DistinguishRoomsDraft ( Document doc, StringBuilder &sb, int &numErr, int &numWarn ) : void
doc Document
sb StringBuilder
numErr int
numWarn int
Résultat void
        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?" );
            }
              }
        }