2025.3 Method
Changes 0
M

Truss.Create

Description:
Creates a new Truss.
public static Truss Create(
	Document document,
	ElementId trussTypeId,
	ElementId sketchPlaneId,
	Curve curve
)
  • document
    The document in which the new Truss is created.
  • trussTypeId
    Element id of the truss type.
  • sketchPlaneId
    Element id of a SketchPlane.
  • 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 Truss
  • 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.
  • A non-optional argument was null
  • This function is only enabled in Revit Structure and Revit Architecture. -or- Failed to create Truss element.