Add a new shared parameter to the family.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- familyDefinition
- Type: Autodesk.Revit.DBExternalDefinition
The definition of the loaded shared parameter.
- parameterGroup
- Type: Autodesk.Revit.DBBuiltInParameterGroup
The group to which the family parameter belongs.
- isInstance
- Type: SystemBoolean
Indicates if the new parameter is instance or type.
Return Value
If creation was successful the new shared parameter is returned, otherwise an exception with failure information will be thrown.Remarks
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.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | Thrown when the input parameter group cannot be assigned to the new parameter. |
Autodesk.Revit.ExceptionsInvalidOperationException | Thrown when the shared family parameter creation is not supported. Or trying to add an instance parameter of image type. |