We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.

Ansys Learning Forum Forums Discuss Simulation Fluids to get actual iteration in Scheme langage like N_ITER in UDF Reply To: to get actual iteration in Scheme langage like N_ITER in UDF

Federico
Ansys Employee

Actually, you're right! (client-inquire-iteration) does get the iteration number. 

You can do something like:

(make-new-rpvar 'n_iter (client-inquire-iteration) 'integer) ; this creates the rpvar n_iter. You will need to call this once

(rpsetvar 'n_iter (client-inquire-iteration)) ; this sets the value of n_iter to the iteration number. You will need to call this each time before using n_iter