AssociateWithGlobalParameter Method


Associates this parameter with a global parameter in the same document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since: 2016 Subscription Update

Syntax

C#
public void AssociateWithGlobalParameter(
	ElementId gpId
)
Visual Basic
Public Sub AssociateWithGlobalParameter ( _
	gpId As ElementId _
)
Visual C++
public:
void AssociateWithGlobalParameter(
	ElementId^ gpId
)

Parameters

gpId
Type: Autodesk.Revit.DB ElementId
Id of a global parameter contained in this parameter's 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

Exceptions

Exception Condition
Autodesk.Revit.Exceptions 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.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also