Namespace:
Autodesk.Revit.DB.Structure
PathReinforcement
Class
Description:
An object that represents an Path Reinforcement within the Autodesk Revit project.
An object that represents an Path 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.
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.
Inheritance Hierarchy:
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.PathReinforcement
System.Object
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Structure.PathReinforcement
Examples
private void Getinfo_PathReinforcement(PathReinforcement pathReinforcement)
{
string message = "PathReinforcement : ";
// Show the NumBarDescriptions property
IList<ElementId> rebarInSystemIds = pathReinforcement.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 PathReinforcement Curves information
IList<ElementId> curveIds = pathReinforcement.GetCurveElementIds();
message += "\nPath Reinforcement has " + curveIds.Count + " path curves.";
foreach (Autodesk.Revit.DB.ElementId ii in curveIds)
{
ModelCurve pathCurve = doc.GetElement(ii) as ModelCurve;
if (null == pathCurve)
{
continue;
}
Curve curve = pathCurve.GeometryCurve; // 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 += " End point (" + end.X + ", " + end.Y + ", " + end.Z + ")";
}
TaskDialog.Show("Revit", message);
}