Global Parameters
Global parameters are accessible by any element in the model
A New Kind of Parameter
In Revit 2016, a new kind of parameter was introduced to to the application: the Global Parameter. These were designed to let the users control a value from a single location, which could be referenced anywhere in the model.
In Revit's API, there are a few classes which relate to this new functionality:
GlobalParameterManager Class: This is used to access any global parameters in a Revit document.
GlobalParameter Class: Objects of this class represent a single global parameter.
Accessing Global Parameters
We can retrieve any or all global parameters in a document using the GlobalParameterManager class, like so:
Getting and Setting Values
We can retrieve the value from any GlobalParameter object using its GetValue() method, like so:
We can also set the value, using the SetValue() method, although it will need to be wrapped in a transaction, as we're editing the Revit document.
Last updated