as mentioned, you will need a udf for this.
please go through help where you can find some examples of udf. then you will have to write your own udf.
Guidelines on the Student Community
How to access ANSYS help links
Please Login to Report Topic
Please Login to Share Feed