I have a model that iterates over unique field values and uses the select tool to output features as shapefiles using the unique value as the naming convention. It works....sort of. It runs through the entire iteration but only outputs the first 2 results. The first 2 results are correct but where are the rest of my files going?! Attached is my toolbox. You can use any data you want in it.
Using version 10.2.2.
-Steven
If you just have need for a toolset to perform that task use Split Layer By Attributes or to at least check your model functionality
For those who try something similar. Use Dan's tool and save yourself the headache .
Thanks for the link. I looked at 10.3 and this NIM was addressed. NIM098729 In ArcGIS for Desktop 10.2.1, when running a model with the Iterate Feature tool, an incorrect number of outputs are generated only when running the model as a tool.
I assume this when it was fixed. I didn't see it in the 10.4 docs.
Anyways, its fixed in 10.4.
http://downloads.esri.com/support/downloads/other_/104-IssuesAddressedList.pdf
there is a document for 10.3... check to see it was an issue, whether it was reported and/or whether it was solved.
So this is definitely an issue with 10.2.2. I just ran the iterator with select on version 10.4 and it works perfectly.
I was using the value in the selection expression such as Stream = '%value%'. Using apostrophes was the only way to get it to work because my values were strings. I assume it is trying to select where the stream name actual equals %value% instead of the actual field value. I tried simply assigning the value field back into the expression but it would error out. I tried building it a couple different ways using make feature layer and select layer by attributes but none of them would output the geometry.
An observation: shouldn't there be a tie from Iterate Field Values back to the Select function? Like from Value to Select? Or is that buried in the Select?
Chris Donohue, GISP
Modify as you see fit Steven, that is why it is open
I give up... I'm just going to you your tool.
Thanks again,
check Geoprocessing Options to ensure that "results of geoprocessing options are added to display" is checked on
I had to add a Create Feature Class tool after the select. I don't understand why select has an output option if it's not going to work. But this brings another issue. My shapfiles are being created with the correct name but they aren't be loaded in with the data that was supposed to be selected using the Select Tool.
Thanks, but that didn't seem change my outputs.
Steven...try making the Value variable a Precondition to the Select tool.
Thanks Dan, That seems to do what I need albeit the file naming convention. I can go into your script and change that to what I need it to.
Still curious as to why my model doesn't work right. Maybe someone from esri will chime in.
Thanks,
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.