qualitron.parameter¶
- class Parameter[source]¶
Bases:
objectThe
Parameterclass simplifies interactions with Revit parameters.- static Exists(element, parameterName, isInstance)[source]¶
Checks if a parameter exists as a type or instance parameter.
- Parameters
element (object) – A Revit element
parameterName (string) – The name of the parameter
isInstance (bool) – Specifies if type or instance parameter
- Returns
True if parameter exists, otherwise False
- Return type
bool
- static GetValue(element, parameter, isInstance)[source]¶
Get a parameter value from an element regardless if it is a type or instance parameter.
- Parameters
element (object) – A Revit element
parameter (string) – The parameter name
isInstance (bool) – Specifies if type or instance parameter
- Returns
The Revit ‘ValueString’ for given parameter
- Return type
string
- static ProcessOptions(elements, staticParams=None)[source]¶
Generates a list of parameters that are shared across a given set of elements. The output of this function is intended to be used with the CommandSwitchWindow from pyRevit forms.
- Parameters
elements (object) – A list of Revit elements
- Returns
A list of strings
- Return type
dict
Bases:
objectA utility class of functions related to shared parameter.
Initialize class instance with necassary infos related to shared parameters.
- Parameters
groupname (str) – Shared parameter group name in the text file
paramGroup (obj) – BuiltInParameterGroup of the instance for creating/writing
Create shared parameter to category instances.
- Parameters
category (obj) – Target category
paramGroup (obj) – Parameter group of instance property
paramNames (list) – List of parameter names to create
readOnly (bool, optional) – If the paramer should be user modifible
Copy parameter values from area to direct shape instance.
- Parameters
area (obj) – Source area instance
dishape (obj) – Target direct shape instance
paramDict (dict) – Dictionary {parameter name in area: parameter name in direct shape}