FabricationPartCreate(Document, FabricationServiceButton, Int32, ElementId) Method |
Creates a fabrication part element based on button.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic static FabricationPart Create(
Document document,
FabricationServiceButton button,
int condition,
ElementId levelId
)
Public Shared Function Create (
document As Document,
button As FabricationServiceButton,
condition As Integer,
levelId As ElementId
) As FabricationPart
public:
static FabricationPart^ Create(
Document^ document,
FabricationServiceButton^ button,
int condition,
ElementId^ levelId
)
static member Create :
document : Document *
button : FabricationServiceButton *
condition : int *
levelId : ElementId -> FabricationPart
Parameters
- document Document
-
The document.
- button FabricationServiceButton
-
The fabrication service button to use.
- condition Int32
-
The condition index.
- levelId ElementId
-
The element identifier associated with the Level
the FabricationPart will be created on.
Return Value
FabricationPart
The new fabrication part.
ExceptionsException | 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
|
ArgumentOutOfRangeException |
The index condition is not larger or equal to 0 and less than ConditionCount.
|
InvalidOperationException |
The fabrication part type does not exist. Reload the service using FabricationConfiguration.LoadServices.
|
See Also