Insert Method (Definition, Binding, BuiltInParameterGroup)


Creates a new parameter binding between a parameter and a set of categories in a specified group.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)

Syntax

C#
[ObsoleteAttribute("This method is deprecated in Revit 2024 and may be removed in a future version of Revit. Please use the `Insert(Definition, Binding, ForgeTypeId)` method instead.")]
public virtual bool Insert(
	Definition key,
	Binding item,
	BuiltInParameterGroup parameterGroup
)
Visual Basic
<ObsoleteAttribute("This method is deprecated in Revit 2024 and may be removed in a future version of Revit. Please use the `Insert(Definition, Binding, ForgeTypeId)` method instead.")> _
Public Overridable Function Insert ( _
	key As Definition, _
	item As Binding, _
	parameterGroup As BuiltInParameterGroup _
) As Boolean
Visual C++
[ObsoleteAttribute(L"This method is deprecated in Revit 2024 and may be removed in a future version of Revit. Please use the `Insert(Definition, Binding, ForgeTypeId)` method instead.")]
public:
virtual bool Insert(
	Definition^ key, 
	Binding^ item, 
	BuiltInParameterGroup parameterGroup
)

Parameters

key
Type: Autodesk.Revit.DB Definition
A parameter definition which can be an existing definition or one from a shared parameters file.
item
Type: Autodesk.Revit.DB Binding
An InstanceBinding or TypeBinding object which contains the set of categories to which the parameter should be bound.
parameterGroup
Type: Autodesk.Revit.DB BuiltInParameterGroup
The GroupID of the parameter definition, or INVALID if the parameter is not to be associated with any predefined group.

Remarks

Note the type of the binding object dictates whether the parameter is bound to all instances or just types. A parameter definition cannot be bound to both instances and types. If the Parameter binding already exists, post an error and return false

See Also