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

ListRoomData() public méthode

List some properties of a given room to the Visual Studio debug output window.
public ListRoomData ( Room room ) : void
room Room
Résultat void
        void ListRoomData( Room room )
        {
            SpatialElementBoundaryOptions opt
            = new SpatialElementBoundaryOptions();

              string nr = room.Number;
              string name = room.Name;
              double area = room.Area;

              Location loc = room.Location;
              LocationPoint lp = loc as LocationPoint;
              XYZ p = ( null == lp ) ? XYZ.Zero : lp.Point;

              BoundingBoxXYZ bb = room.get_BoundingBox( null );

              IList<IList<BoundarySegment>> boundary
            = room.GetBoundarySegments( opt );

              int nLoops = boundary.Count;

              int nFirstLoopSegments = 0 < nLoops
            ? boundary[0].Count
            : 0;

              BoundingBoxXYZ boundary_bounding_box
            = GetBoundingBox( boundary );

              List<XYZ> convex_hull
            = GetConvexHullOfRoomBoundary( boundary );

              Debug.Print( string.Format(
            "Room nr. '{0}' named '{1}' at {2} with "
            + "lower left corner {3}, convex hull {4}, "
            + "bounding box {5} and area {6} sqf has "
            + "{7} loop{8} and {9} segment{10} in first "
            + "loop.",
            nr, name, Util.PointString( p ),
            Util.PointString( boundary_bounding_box.Min ),
            Util.PointArrayString( convex_hull ),
            BoundingBoxString2( bb ), area, nLoops,
            Util.PluralSuffix( nLoops ), nFirstLoopSegments,
            Util.PluralSuffix( nFirstLoopSegments ) ) );
        }