Ansys Employee

Bottom of the page here,    The purpose of the example is to show how and where you need to call HOST and NODE values. 

If you just want the average pressure in your model use a Surface Integral: UDFs are not always simple and are generally specific to the required task.