Hello everybody,
I have a folder with multiple text files containing X Y data. I would like to transform each of these txt files into a .lyr file.
I thought I could work with Model Builder but I think I have problem using "Files iterator".
For each txt file, I would like to obtain one .lyr file but by running the below model I obtain a single file (and not several one).
Could you please help me ?
Solved! Go to Solution.
The Iterate Files tool has an output format (file) that can not be connected to the Make XY Event Layer tool. Use the Iterate Tables tool instead.
See NewModel in attached toolbox.
Hello,
Thank you for your reply.
I don't know why but when I try to connect the green box "File.txt" and the tool "make xy event layer" it is always a dashed line (precondition) and not a solid one.
perhaps I have to fix something with the name of the Input / output...I don't know what's going wrong
The naming may become an issue if the resulting layers are being placed in a File Geodatabase.
Additional rules
Chris Donohue, GISP
More precision on the data ? Ok !
The text files I want to transform in .lyr files (or shapefiles...) are composed of 3 columns: X,Y and time.
Here is an overview:
Y,X,TIME
51.21646,5.08759,1900-01-01 10:37:27
51.21643,5.08798,1900-01-01 10:37:32
51.21653,5.0882,1900-01-01 10:37:37
51.2166,5.08844,1900-01-01 10:37:42
51.21664,5.0886,1900-01-01 10:37:47
51.21664,5.0886,1900-01-01 10:37:52
What I don't understand is that when I develop a model for one single text file, it works. Thus, I think my issue is related to the "File iterator tool".
Ok, no problem.
In the attached file, the toolbox related to the picture I posted previously.
Let me be clearer: In a folder called Folder1, I have multiple text files structured like this:
Y,X,TIME
51.21646,5.08759,1900-01-01 10:37:27
51.21643,5.08798,1900-01-01 10:37:32
51.21653,5.0882,1900-01-01 10:37:37
51.2166,5.08844,1900-01-01 10:37:42
I would like to use model builder to automate the process of "Make XY event layer" and "save to layer file".
I thought I could use the file iterator tool to run the model on all the text files in folder 1.
Thanks for your help ! I appreciate a lot...
Great, Thank you !
I thought I had to use the "File iterator"...I don't know why I never tried this "Table iterator"...
Thank you for your help !