Add a new control into the Autodesk Revit family document.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- controlShape
- Type: Autodesk.Revit.DBControlShape
The shape of the control.
- view
- Type: Autodesk.Revit.DBView
The view in which the control is to be visible. It must be a FloorPlan view or a CeilingPlan view.
- origin
- Type: Autodesk.Revit.DBXYZ
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.ExceptionsArgumentNullException | Thrown when the input argument-"view" or "position"-is a null reference (Nothing in Visual Basic). |
Autodesk.Revit.ExceptionsArgumentException | Thrown when the input argument-"view"-is invalid. |
Autodesk.Revit.ExceptionsArgumentOutOfRangeException | Thrown when the input argument-"controlType"-is out of range. |
Autodesk.Revit.ExceptionsInvalidOperationException | Thrown when control creation failed. |