Create a path (Viewer-->Tools-->Path-->select points) by selecting nodes along the line you want to use as x-axis of the plot. Now extract xy data along that path (Viewer-->output-->create xy-data-->path).
To write the data to an ASCII file, use 'report'->XY data.