Creates a free placed hanger.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2017
Syntax
| C# |
|---|
|
| Visual Basic |
|---|
|
| Visual C++ |
|---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document.
- button
- Type: Autodesk.Revit.DBFabricationServiceButton
The fabrication service button to use.
- condition
- Type: SystemInt32
The condition index. If the button has multiple conditions.
- levelId
- Type: Autodesk.Revit.DBElementId
The level identifier associated with the level.
Return Value
The newly-created fabrication hanger.Exceptions
| Exception | Condition |
|---|---|
| Autodesk.Revit.ExceptionsArgumentException | Invalid fabrication service button. |
| Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
| Autodesk.Revit.ExceptionsArgumentOutOfRangeException | The index condition is not larger or equal to 0 and less than ConditionCount. |