FabricationPart.Create(Document, FabricationServiceButton, Int32, ElementId)
Method
Description:
Creates a fabrication part element based on button.
Creates a fabrication part element based on button.
Syntax
public static FabricationPart Create(
Document document,
FabricationServiceButton button,
int condition,
ElementId levelId
)
Parameters
Parameter | Type | Description |
---|---|---|
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 <a href="577e5d4e-a558-118c-9dea-3b810b061775.htm">Level</a> the <a href="c9b86162-c105-696a-a919-49a7a7938cc4.htm">FabricationPart</a> will be created on. |
Return Value
Type | Description |
---|---|
FabricationPart | The new fabrication part. |
Exceptions
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 |
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. |