AttributeError when accessing parameter properties through Python

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
from Autodesk.DesignScript.Geometry import *

from Autodesk.Revit.DB import *

element = IN[0]
params = []

for p in element.Parameters:
	if p.Definition.ParameterType == ParameterType.Length:

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.

Not entirely sure but I think you need to Unwrap the Dynamo element first to get to the Revit Element.

Didn’t know about that, thank you!