1

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

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jul 7, 2015 at 21:25
3
  • This can be done easily in python/arcpy. Commented 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/… Commented 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? Commented Jul 8, 2015 at 14:15

1 Answer 1

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.