Is there a way to tell if a parameter is a type parameter?

I am trying to resolve a schedules parameter list with families to identify which families have missing shared parameters. Is there a way to get if a parameter is a type parameter?

let me open dynamo real quick.
I think itΒ΄s β€œparameter.type”

or this: https://dictionary.dynamobim.com/2/#/Revit/Elements/GlobalParameter/Query/ParameterType

looked at that but thats global parameter. issue is gathering a list of scheduled parameters for doors but some are type and some are instance AND some are hidden Revit parameters (to-Room)

Someone else here may be able to provide a more complete answer, but it is possible through the Revit API. Assuming my variable param is a valid Parameter:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import ElementType

param_elem = param.Element
# If the host element is an ElementType, assume the parameter is a Type Parameter.
# True if type, false if instance.
OUT = isinstance(param_elem, ElementType)

The function isinstance() has nothing to do with Revit specifically, despite the similar language. The above code will not actually run either, as param is still undefined, however if I could see what you have done so far I may be able to rework it into an actual solution.

2 Likes