Creates a fabrication part element based on button.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2016
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DB Document
The document.
- button
- Type: Autodesk.Revit.DB FabricationServiceButton
The fabrication service button to use.
- condition
- Type: System Int32
The condition index.
- levelId
- Type: Autodesk.Revit.DB ElementId
The element identifier associated with the Level the FabricationPart will be created on.
Return Value
The new fabrication part.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | Fabrication service button contains invalid fittings. -or- Please use FabricationPart.CreateHanger to create fabrication hanger. -or- The ElementId levelId is not a Level. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | the index condition is not larger or equal to 0 and less than ConditionCount |
Autodesk.Revit.Exceptions InvalidOperationException | The fabrication part type does not exist. Reload the service using FabricationConfiguration.LoadServices. |