RVTDocs.com

AreaReinforcement

Class
Description:
An object that represents an Area Reinforcement within the Autodesk Revit project.
Remarks:
This object derived from the Element base object and such supports all the methods of that object such as the ability to retrieve the parameters of that object. The Area Reinforcement element is available only in the Autodesk Revit Structure product.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.Element
    Autodesk.Revit.DB.Structure.AreaReinforcement
Syntax
public class AreaReinforcement : Element
Examples
public void GetInfo_AreaReinforcement(AreaReinforcement areaReinforcement)
{
    string message = "AreaReinforcement : ";

    // Show the AreaReinforcement Type information
    //message += "\nType : " + areaReinforcement.AreaReinforcementType.Name;

    // Show the AreaReinforcement bar information
    IList<ElementId> rebarInSystemIds = areaReinforcement.GetRebarInSystemIds();
    message += "\nNumber of distinct bar shapes : " + rebarInSystemIds.Count;

    for (int i = 0; i < rebarInSystemIds.Count; i++)
    {
        RebarInSystem ris = doc.GetElement(rebarInSystemIds[0]) as RebarInSystem;
        message += "\nBar count : " + ris.Quantity;
        message += "\nBar type name : " + ris.Name;
        message += "\nBar length : " + ris.LookupParameter("Bar Length").AsDouble();
    }

    // Show the AreaReinforcement Curves information
    IList<ElementId> curveIds = areaReinforcement.GetBoundaryCurveIds();
    message += "\nArea Reinforcement has " + curveIds.Count + " boundary curves.";
    foreach (Autodesk.Revit.DB.ElementId ii in curveIds)
    {
        AreaReinforcementCurve reinCurve = doc.GetElement(ii) as AreaReinforcementCurve;
        if (null == reinCurve)
        {
            continue;
        }
        Curve curve = reinCurve.Curve; // get the location curve
        XYZ start = curve.GetEndPoint(0);  // get the start point of the curve
        XYZ end = curve.GetEndPoint(1);    // get the end point of the curve
        message += "\nCurve: Start point (" + start.X + ", " + start.Y + ", " + start.Z + ")";
        message += "\n       End point (" + end.X + ", " + end.Y + ", " + end.Z + ")";
    }

    TaskDialog.Show("Revit", message);
}