Revit 2025.3 API
Fabrication |
Creates a fabrication part element based on button and size.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public static FabricationPart Create( Document document, FabricationServiceButton button, double width, double depth, ElementId levelId )
Public Shared Function Create ( document As Document, button As FabricationServiceButton, width As Double, depth As Double, levelId As ElementId ) As FabricationPart
public: static FabricationPart^ Create( Document^ document, FabricationServiceButton^ button, double width, double depth, ElementId^ levelId )
static member Create : document : Document * button : FabricationServiceButton * width : float * depth : float * levelId : ElementId -> FabricationPart
Parameters
- document Document
- The document.
- button FabricationServiceButton
- The fabrication service button to use. Matches button condition based on the specified size.
- width Double
- The width of the part. Units are in feet (ft).
- depth Double
- The depth of the part. Units are in feet (ft). It should be equal to width for round part.
- levelId ElementId
- The element identifier associated with the Level the FabricationPart will be created on.
Return Value
FabricationPartThe new fabrication part.

Exception | Condition |
---|---|
ArgumentException | Fabrication service button contains invalid fittings. -or- Please use FabricationPart.CreateHanger to create fabrication hanger. -or- The ElementId levelId is not a Level. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | The fabrication part type does not exist. Reload the service using FabricationConfiguration.LoadServices. -or- failing to match a button condition based on specific size. |
See Also