NewControl Method


Family Item Factory New Control Method

Add a new control into the Autodesk Revit family document.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public Control NewControl(
	ControlShape controlShape,
	View view,
	XYZ origin
)

Parameters

controlShape ControlShape
The shape of the control.
view View
The view in which the control is to be visible. It must be a FloorPlan view or a CeilingPlan view.
origin XYZ
The origin of the control.

Return Value

Control
If successful, the newly created control is returned, otherwise an exception with error information will be thrown.
Exceptions
Exception Condition
ArgumentNullException Thrown when the input argument-"view" or "position"-is .
ArgumentException Thrown when the input argument-"view"-is invalid.
ArgumentOutOfRangeException Thrown when the input argument-"controlType"-is out of range.
InvalidOperationException Thrown when control creation failed.
See Also