I have this application which opens multiple .txt files and then plots them in a 3d graph. my problem is, the single files are not plotted next to each other but after each other, so there is no 3d surface but a line containing all data.
I'm afraid you haven't really made your problem very clear, you posted a number of times on the same issue, and you didn't post any sample data at first. For all of these reasons, yours was not an inviting question to attempt to answer, and people just ignored it.
I think I understand what you want given the sample data, but I'm not entirely sure. Attached is a modified version of your library with a new top-level file that does what I think you want to do.
Hope this helps, and keep in mind that if you avoid the things I listed above, you will get a faster answer in the future.