Revit 2025 API
Path |
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()
Public Function GetCurveElementIds As IList(Of ElementId)
public: IList<ElementId^>^ GetCurveElementIds()
member GetCurveElementIds : unit -> IList<ElementId>
Return Value
IListElementIdA collection of ElementIds of ModelCurve elements.

Each ElementId in the collection is an Id of an Element of type ModelCurve.

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); }
Private Sub Getinfo_PathReinforcementCurve(pathReinforcement As PathReinforcement) Dim message As String = "Path Reinforcement Curves : " ' Get path reinforcement curves by iterating the Curves property Dim curveIds As IList(Of ElementId) = pathReinforcement.GetCurveElementIds() For Each ii As Autodesk.Revit.DB.ElementId In curveIds Dim pathReinforcementCurve As ModelCurve = TryCast(doc.GetElement(ii), ModelCurve) If pathReinforcementCurve Is Nothing Then Continue For End If Dim curve As Autodesk.Revit.DB.Curve = pathReinforcementCurve.GeometryCurve ' Get curve start point message += ((vbLf & "Curve 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 & ")" Next TaskDialog.Show("Revit", message) End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also