Revit 2022.1 API |
FamilyManager..::..AssociateElementParameterToFamilyParameter Method |
FamilyManager Class See Also |
Associates or disassociates the element parameter to an existing family parameter.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.1.0)
Syntax
C# |
---|
public void AssociateElementParameterToFamilyParameter( Parameter elementParameter, FamilyParameter familyParameter ) |
Visual Basic |
---|
Public Sub AssociateElementParameterToFamilyParameter ( _ elementParameter As Parameter, _ familyParameter As FamilyParameter _ ) |
Visual C++ |
---|
public: void AssociateElementParameterToFamilyParameter( Parameter^ elementParameter, FamilyParameter^ familyParameter ) |
Parameters
- elementParameter
- Type: Autodesk.Revit.DB..::..Parameter
The parameter of an element in family.
- familyParameter
- Type: Autodesk.Revit.DB..::..FamilyParameter
The existing family parameter. If the input to this argument is nullNothingnullptra null reference (Nothing in Visual Basic), it will disassociate the element parameter from any family parameters.
Remarks
The parameter types of these two input parameter should be same, if not an
exception with failure information will be thrown.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the input argument-"elementParameter"-is nullNothingnullptra null reference (Nothing in Visual Basic). |
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when the input argument-"elementParameter" or "familyParameter"-is an invalid parameter, or the input argument-"elementParameter"-cannot be associated. |
Autodesk.Revit.Exceptions..::..InvalidOperationException | Thrown when the family parameter binding failed. |