The Autodesk.Revit.DB.CurveNode
class represents a point on the curve in the Revit API. It is a part of the Autodesk.Revit.DB
namespace that contains classes related to the Revit database.
The CurveNode
class has the following properties:
Parameter
- Gets or sets the parameter value at the node on the curve.Curve
- Gets or sets the curve that contains the node.GeometryObject
- Gets the geometry object that contains the curve.The CurveNode
class has the following methods:
Clone()
- Creates a copy of the curve node.Dispose()
- Releases the resources used by the curve node.Equals(Object)
- Compares the current curve node with the specified object.GetHashCode()
- Returns the hash code for the curve node.The following code example demonstrates how to create a CurveNode
:
// Create a new line.
Line line = Line.CreateBound(new XYZ(0, 0, 0), new XYZ(10, 0, 0));
// Create a curve node at the start of the line.
CurveNode node = new CurveNode(line, 0);
In the above example, a new line is created using the Line.CreateBound
method. A curve node is then created using the CurveNode
constructor and passing the line and the parameter value at which to create the node.
CurveNode
class is used in conjunction with other Revit API classes such as FamilyInstance
, Wall
, and Roof
to represent points on the curves that make up these objects.GeometryObject
property of a CurveNode
can be used to obtain the object that contains the curve.