Hi Kalmar,

I copied the code from "Petra on programing", but probably you can use if(tdm()==1 .... as well. I'm very new user of this amazing software.