Truss Create Method |
Creates a new Truss.
Namespace: Autodesk.Revit.DB.Structure
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)

public static Truss Create(
Document document,
ElementId trussTypeId,
ElementId sketchPlaneId,
Curve curve
)
Parameters
- document Document
- The document in which the new Truss is created.
- trussTypeId ElementId
- Element id of the truss type.
- sketchPlaneId ElementId
- Element id of a SketchPlane.
- curve Curve
- The curve of the truss element. It must be a line, must not be a vertical line, and must be within the sketch plane.
Return Value
Truss
Exception | Condition |
---|---|
ArgumentException | The input curve points to a helical curve and is not supported for this operation. -or- The element id should refer to a valid TrussType. -or- The element id should refer to a valid SketchPlane. -or- The curve is invalid to be the base curve of a truss. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | This function is only enabled in Revit Structure and Revit Architecture. -or- Failed to create Truss element. |
