Add a new control into the Autodesk Revit family document.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- controlShape
- Type: Autodesk.Revit.DB ControlShape
The shape of the control.
- view
- Type: Autodesk.Revit.DB View
The view in which the control is to be visible. It must be a FloorPlan view or a CeilingPlan view.
- origin
- Type: Autodesk.Revit.DB XYZ
The origin of the control.
Return Value
If successful, the newly created control is returned, otherwise an exception with error information will be thrown.Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentNullException | Thrown when the input argument-"view" or "position"-is a null reference ( Nothing in Visual Basic) . |
Autodesk.Revit.Exceptions ArgumentException | Thrown when the input argument-"view"-is invalid. |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | Thrown when the input argument-"controlType"-is out of range. |
Autodesk.Revit.Exceptions InvalidOperationException | Thrown when control creation failed. |