PathReinforcementGetCurveElementIds Method

Retrieves the set of ElementIds of curves forming the boundary of the Path Reinforcement.

Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public IList<ElementId> GetCurveElementIds()

Return Value

IListElementId
A collection of ElementIds of ModelCurve elements.
Remarks
Each ElementId in the collection is an Id of an Element of type ModelCurve.
Example
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);

}
See Also