PathReinforcement.GetCurveElementIds
Method
Description:
Retrieves the set of ElementIds of curves forming the boundary of the Path Reinforcement.
Retrieves the set of ElementIds of curves forming the boundary of the Path Reinforcement.
Remarks:
Each ElementId in the collection is an Id of an Element of type ModelCurve.
Each ElementId in the collection is an Id of an Element of type ModelCurve.
Examples
private void Getinfo_PathReinforcementCurve(PathReinforcement pathReinforcement)
{
string message = "Path Reinforcement Curves : ";
// Get path reinforcement curves by iterating the Curves property
IList<ElementId> curveIds = pathReinforcement.GetCurveElementIds();
foreach (Autodesk.Revit.DB.ElementId ii in curveIds)
{
ModelCurve pathReinforcementCurve = doc.GetElement(ii) as ModelCurve;
if (null == pathReinforcementCurve)
{
continue;
}
Autodesk.Revit.DB.Curve curve = pathReinforcementCurve.GeometryCurve;
// Get curve start point
message += "\nCurve start point:(" + curve.GetEndPoint(0).X + ", "
+ curve.GetEndPoint(0).Y + ", " + curve.GetEndPoint(0).Z + ")";
// Get curve end point
message += "; Curve end point:(" + curve.GetEndPoint(1).X + ", "
+ curve.GetEndPoint(1).Y + ", " + curve.GetEndPoint(1).Z + ")";
}
TaskDialog.Show("Revit", message);
}