FamilyManagerAddParameter(ExternalDefinition, ForgeTypeId, Boolean) Method |
Add a new shared parameter to the family.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic FamilyParameter AddParameter(
ExternalDefinition familyDefinition,
ForgeTypeId groupTypeId,
bool isInstance
)
Public Function AddParameter (
familyDefinition As ExternalDefinition,
groupTypeId As ForgeTypeId,
isInstance As Boolean
) As FamilyParameter
public:
FamilyParameter^ AddParameter(
ExternalDefinition^ familyDefinition,
ForgeTypeId^ groupTypeId,
bool isInstance
)
member AddParameter :
familyDefinition : ExternalDefinition *
groupTypeId : ForgeTypeId *
isInstance : bool -> FamilyParameter
Parameters
- familyDefinition ExternalDefinition
- The definition of the loaded shared parameter.
- groupTypeId ForgeTypeId
- The identifier of the parameter group to which the family parameter belongs.
- isInstance Boolean
- Indicates if the new parameter is instance or type.
Return Value
FamilyParameterIf creation was successful the new shared parameter is returned,
otherwise an exception with failure information will be thrown.
ExceptionsException | Condition |
---|
ArgumentException |
Thrown when the input parameter group cannot be assigned to the new parameter.
|
InvalidOperationException |
Thrown when the shared family parameter creation is not supported.
Or trying to add an instance parameter of image type.
|
RemarksThis 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