This is absolutely awesome! Thank you so much!
I just want to point out that in the following instruction
Quote from WRITETP-copy.klSET_POS_TPE(open_id, pos_num, tmp_pos, op_status , G1)
tmp_pos is of XYZWPR but if it were replace by a JOINTPOS type, the same line would be written in the TP program but with a Joint representation... Might be obvious to some but still worthy of mentioning.