Print() func does not work

Hello all,
I was trying to use the print() method in order to see the name of parameters and discovered that I am getting an error:
“Warning:
IronPythonEvaluator.EvaluateIronPythonScript operation failed.
unexpected token ‘print’”

So I started a new python node, importing the clr only - and the print() method does not work.
Anyone no how to address this issue?

Hi zvith,

I think that you don’t need to use print() function to see the result. Assign your value to OUT variable and you are good to go!

For example:
OUT = “asdf”

Cheers!

Thanks for the quick response.
The issue is that I am trying to use ParametersMap property from an element and when I iterate through and add the parameters to a list - it outputs only the the parameters type, so I don’t really know what to do and I and just going by trial end error…
Any suggestions?

No problem. Script is working fine. It is assigning Parameter element from your input element. You could experiment and try getting Name or Value from each parameter, to see, that each parameter is in fact different.

In line 12 change e to e.Definition.Name and see the results!

Below Revit API docs reference:


2 Likes

Thanks for the help!