Rob
Ansys Employee

Debug on a smaller model. Then turn bits off until it works. Turn bits on until it doesn't. That's pretty much how I debug UDFs in the event I can't get a colleague to write them for me.