Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am having difficulties in finding a way to use the input path and set is as the output path for a simple Copy Features tool. I use the substitution by the workspace but it outputs the results into the default ArcGIS folder.

I am not sure how to set the workspace to hold the path of the input feature class. As the input feature class is a parameter, I cannot use a hardcoded path. Please see below:

enter image description here

share|improve this question

2 Answers 2

In the first example, you can parse the path and call %Value%. In the second example (which may not apply in your case), you can write intermediate files to in_memory workspace--thus, eliminating the need for parsing the path and possibly eliminating the need for the Copy Features tool.

enter image description here

enter image description here

share|improve this answer
    
Many thanks - This is what I am looking for. but I cannot find the Parse Path tool? How to add it to the model builder? –  meryloo May 13 '13 at 13:59
1  
Right click on the ModelBuilder screen > Model Only Tools > Parse Path –  Aaron May 13 '13 at 14:03
1  
To make sure the parse path runs first, connect "Value" to the "Copy Features" tool as a precondition. –  Curtis Price May 13 '13 at 17:17
    
Thanks @Curtis, post edited to address comments –  Aaron May 13 '13 at 17:25

Use the Parse Path tool (only available within Model Builder) on the input features, using the 'PATH' option, and name the output 'workspace' to get it to work with your current Copy Features settings.

share|improve this answer
    
Many thanks - This is what I am looking for, but I cannot find the Parse Path tool? How to add it to the model builder? I can easily add other tool, for example, Add Fiel via the Search tab, but not the Parse Path –  meryloo May 13 '13 at 14:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.