Hello everyone,
I am trying to get into the Revit API and have been playing around with parameters a bit. I wanted to recreate the following tutorial as a python script in dynamo:
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
element = IN[0]
params = []
for p in element.Parameters:
if p.Definition.ParameterType == ParameterType.Length:
params.append(p)
OUT = params
This is the dynamo setup I used:
But I always get the following error: AttributeError: ‘Parameter’ object has no attribute ‘Definiton’. I have tried it with different elements and in different versions of Revit and I also tried to get different propierties from the parameter, but I always got the AtrributeError.