I am trying to iterate through some feature classes, named "Hos_AllPatients2014", and select the certain data and name it "Hos_IP", then export it to the corresponding folder "Hos". I have already made folders for each "Hos" that contain another layer I had to make for each. However, there are some "AllPatients2014" feature classes for which I do not have a folder. I thought I deleted them all out, but found out halfway through my model running that it had an error and stopped. I would have liked to have had the model contain a portion to check if "Hos_IP" already exists, and if so move on to the next iteration. Instead, I had to create a new folder with the remaining "AllPatients2014" and started the model again.
I would like to find out how to get the model to make this check for a feature class and skip to the next iteration if it exists. I would also be interested to figure out if the folder for "Hos" exists, and if not, create a folder for it and go ahead and export the data like the rest.
I don't know how helpful a picture of my model will be, but it is included. Also open to hearing how I can refine the whole thing.Iterate FC
-
This can be done easily in python/arcpy.Nxaunxau– Nxaunxau2015年07月08日 01:43:14 +00:00Commented Jul 8, 2015 at 1:43
-
Have you seen/tried this before, resources.arcgis.com/en/help/main/10.1/index.html#//…. This can be incorporated to the second part of your question as in stackoverflow.com/questions/273192/…fatih_dur– fatih_dur2015年07月08日 02:22:36 +00:00Commented Jul 8, 2015 at 2:22
-
Yes, I knew it could be done with python. However, I am unsure of the wording of the script. The example from the help index seems to be more complicated than what I need. Does anyone have an idea of the script I would write?Morgan Atkins– Morgan Atkins2015年07月08日 14:15:59 +00:00Commented Jul 8, 2015 at 14:15
1 Answer 1
You can implement if-then-else logic with Branching
Explore related questions
See similar questions with these tags.