Hi Sura,
The .tfwx format is not publicly documented.
I would suggest using ArbExpress to create your waveform on your computer and then save it as a .tfwx to send to your AFG and save it again as a .csv so you can read it in your script.
Another option would be to build the waveform you want on the AFG, transfer the .tfwx to your PC, open it on ArbExpress and save it as a .csv.