Hello everyone and thank you very much for your time.
I comment on my mistake, I am developing a script to obtain the names, types, and units of the project parameters, I had made the python script in Revit 2020 and everything worked very well, the problem is when I try to run it in versions of Revit 2019 or earlier. The safest thing is that it is due to the API, so I ask for your help to know if something I have to change for these versions or how I can solve the problem. The message tells me the following: Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 12, in
UnicodeDecodeError: (‘unknown’, u ‘\ xfc’, 0, 1, ‘’)
This is the Code for the Python Script
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
param = UnwrapElement(IN[0])
name,groups, types, units = [],[],[],[]
for i in param:
dfn = i.GetDefinition()
name.append(str(dfn.Name))
groups.append(str(dfn.ParameterType))
types.append(str(dfn.ParameterGroup))
units.append(str(dfn.UnitType))
OUT = name,groups, types, units