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:

https://help.autodesk.com/cloudhelp/2018/ENU/Revit-API/Revit_API_Developers_Guide/Basic_Interaction_with_Revit_Elements/Parameters/Definition.html

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.

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!