extract or export xyz from tin \ stm

Trying to export xyz data from TIN nodes (or STM) into a txt file - what's the procedure?