RVTDocs.com
Namespace: Autodesk.Revit.DB Class: Parameter

Parameter.AssociateWithGlobalParameter

Method
Description:
Associates this parameter with a global parameter in the same document.
Remarks:

The parameter must be parameterizable, meaning it cannot be read-only, driven by a formula, or have any other restrictions imposed by Revit.

The parameter's value type must match the type of the global parameter.

Once associated property can be later dissociated by calling the DissociateFromGlobalParameter() method

Syntax
Parameters
Parameter Type Description
gpId ElementId Id of a global parameter contained in this parameter's document
Return Value
Exceptions
Exception Condition
ArgumentException The input gpId is not of a valid global parameter of the given document. -or- This parameter does not exist in the document anymore. -or- This parameter is either not parameterizable or does not match the type of the global parameter.
ArgumentNullException A non-optional argument was NULL