5

I am trying to create a model that takes an input layer, which will always be located in a unique folder on my hard drive, and spit out a set of analyses in the same unique folder the input was referenced from.

For example, I want to be able to add "X.shp" to the map from C:\Folder1, run the model, and have the outputs be saved into Folder1 automatically. If "X.shp" was taken from C:\Folder2, I would want the output to be saved automatically in Folder2. Is it possible to automate this?

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Jul 5, 2013 at 19:32

1 Answer 1

5

The attached model is a really simple implementation of what you describe. There are two parameters "P". The first is the input shapefile and the second is the output name (e.g. Output Feature Class (2)). In this example, you can specify parameters by right-clicking on the tool> Make Variable> From Parameter> Output Feature Class. Here, I used %Value% in the output location which is PATH from the Parse Path tool.

enter image description here

enter image description here

answered Jul 5, 2013 at 20:52
2
  • This is really useful, thank you! Does this always have to be done using Feature Class to Feature Class? I couldn't figure out how to incorporate other tools, such as a buffer, and get the same results without tying it to the output given in the exact method used in your example. Commented Jul 18, 2013 at 0:52
  • 1
    In the case of another tool such as Buffer, you need to pass the value off like so %Value%/your_file_name_here. Remember, the %Value% PATH is the pathname which contains the featureclass rather than the direct path to the FC. Commented Jul 18, 2013 at 13:09

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.