Revit 2025.3 API
Family |
Add a new family type parameter to control the type of a nested family within another family.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public FamilyParameter AddParameter( string parameterName, ForgeTypeId groupTypeId, Category familyCategory, bool isInstance )
Public Function AddParameter ( parameterName As String, groupTypeId As ForgeTypeId, familyCategory As Category, isInstance As Boolean ) As FamilyParameter
public: FamilyParameter^ AddParameter( String^ parameterName, ForgeTypeId^ groupTypeId, Category^ familyCategory, bool isInstance )
member AddParameter : parameterName : string * groupTypeId : ForgeTypeId * familyCategory : Category * isInstance : bool -> FamilyParameter
Parameters
- parameterName String
- The name of the new family parameter.
- groupTypeId ForgeTypeId
- The identifier of the group to which the family parameter belongs.
- familyCategory Category
- The category to which the new family parameter binds.
- isInstance Boolean
- Indicates if the new family parameter is instance or type.
Return Value
FamilyParameterIf creation was successful the new parameter is returned, otherwise an exception with failure information will be thrown.

Exception | Condition |
---|---|
ArgumentNullException | Thrown when the input argument-"parameterName"-is . |
ArgumentException | Thrown when the input argument-"parameterName"-is already in use, or the input parameter group cannot be assigned to the new parameter, or the input argument-"familyCategory"-is illegal to bind with parameter. |
InvalidOperationException | Thrown when the required family of familyCategory is not existing in current document, , or when the creation failed. Or trying to add an instance parameter of image type. |

This method can work even without any family type, but it cannot be assigned the value via
FamilyManager.Set methods when there is no current type.
See Also