Those two things have nothing to do with each other 😮
you need a re-entry permit before you EXIT the country and you need to do a TDAC before you ENTER.
You get a re-entry permit at Suvarnabhumi or Don Mueang Airports
****
, just tell the officer when you stamp out that you need a re-entry permit
They will send you to the counter to buy one