Skip to content

Parameter.AssociateWithGlobalParameter

Public Class

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

Namespace: Autodesk.Revit.DB

Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)

Syntax

public void AssociateWithGlobalParameter(
ElementId gpId
)

Parameters

gpId ElementId

Id of a global parameter contained in this parameter’s document

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


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