Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Get Parmater Revit API
def GetParameterValue(parameter):
value= None
if parameter.StorageType == StorageType.Double:
value = parameter.AsDouble()
elif parameter.StorageType == StorageType.Integer:
if parameter.Definition.ParameterType == ParameterType.Integer:
value = parameter.AsInteger()
value = parameter.AsValueString()
elif parameter.StorageType == StorageType.String:
value = parameter.AsString()
elif parameter.StorageType == StorageType.ElementId:
value = parameter.AsElementId()
return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment