The faces that belong to the solid.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic FaceArray Faces { get; }Public ReadOnly Property Faces As FaceArray
Get
public:
property FaceArray^ Faces {
FaceArray^ get ();
}member Faces : FaceArray with get
Property Value
FaceArray
RemarksA face may be degenerate. This can be determined with the Face property IsTwoSided.
Exampleprivate void GetFacesAndEdges(Wall wall)
{
String faceInfo = "";
Autodesk.Revit.DB.Options opt = new Options();
Autodesk.Revit.DB.GeometryElement geomElem = wall.get_Geometry(opt);
foreach (GeometryObject geomObj in geomElem)
{
Solid geomSolid = geomObj as Solid;
if (null != geomSolid)
{
int faces = 0;
double totalArea = 0;
foreach (Face geomFace in geomSolid.Faces)
{
faces++;
faceInfo += "Face " + faces + " area: " + geomFace.Area.ToString() + "\n";
totalArea += geomFace.Area;
}
faceInfo += "Number of faces: " + faces + "\n";
faceInfo += "Total area: " + totalArea.ToString() + "\n";
foreach (Edge geomEdge in geomSolid.Edges)
{
}
}
}
TaskDialog.Show("Revit",faceInfo);
}
See Also