BuildingCoder.CmdCurtainWallGeom.list_wall_geom C# (CSharp) Метод

list_wall_geom() публичный Метод

public list_wall_geom ( Wall w, Application app ) : void
w Wall
app Application
Результат void
        void list_wall_geom( Wall w, Application app )
        {
            string s = "";

              CurtainGrid cgrid = w.CurtainGrid;

              Options options
            = app.Create.NewGeometryOptions();

              options.ComputeReferences = true;
              options.IncludeNonVisibleObjects = true;

              GeometryElement geomElem
            = w.get_Geometry( options );

              foreach( GeometryObject obj in geomElem )
              {
            Visibility vis = obj.Visibility;

            string visString = vis.ToString();

            Arc arc = obj as Arc;
            Line line = obj as Line;
            Solid solid = obj as Solid;

            if( arc != null )
            {
              double length = arc.ApproximateLength;

              s += "Length (arc) (" + visString + "): "
            + length + "\n";
            }
            if( line != null )
            {
              double length = line.ApproximateLength;

              s += "Length (line) (" + visString + "): "
            + length + "\n";
            }
            if( solid != null )
            {
              int faceCount = solid.Faces.Size;

              s += "Faces: " + faceCount + "\n";

              foreach( Face face in solid.Faces )
              {
            s += "Face area (" + visString + "): "
              + face.Area + "\n";
              }
            }
            if( line == null && solid == null && arc == null )
            {
              s += "<Other>\n";
            }
              }
              TaskDialog.Show( "revit", s );
        }
CmdCurtainWallGeom