DrAmine
Ansys Employee

I would recommend using the new Fluent Expressions for this kind of simple things. You do not require then to write an UDF.