1

enter image description here

I have a large Model where the user selects the text file, it creates the xy file, then decimates the file, thus creating a feature class.

I would like this decimated feature class to get sorted into my already predefined datasets.

I have the user pick the type animal, in my example if someone picks cat from the drop down I want it to go to the "Cat_101" feature dataset based on the fact they picked keyword "Cat".

I am pretty new to python and model building.

I do understand that this will likely take some python if / then / else statements, but I honestly have no idea where to start with this.

My goal is make this happen behind the scenes. I do understand the user can always select where to save the file, but I want to remove that from them and save it based off their choice of "Cat", "Dog", "Bird".

1

As your FeatureDataset exists already, you give the example of cat_101 then you can use the Copy Feature tool to copy a FeatureClass into the FeatureDataset. You use inline variable substitution to pass a string into the output dataset name.

Using the Copy Features tool

|improve this answer|||||
  • Okay that is brilliant! But how do I set it up to automatically switch between the feature datasets? Say someone picks dog next the time they run the tool, then I need it go to the "Dog_75" dataset. – ESmith Aug 11 '17 at 17:05
  • I did a little more research about this feature, I found: pro.arcgis.com/en/pro-app/help/analysis/geoprocessing/… - System variable substitution looks to be right, but I'm still pretty new to this, so I'm trying to figure out what the loop tool should look like. Think I'm on the right path? – ESmith Aug 11 '17 at 17:50
  • Okay thanks again for putting me onto this as a solution. I just figured out how to do this dynamically by following what you gave me and putting Scratch.grb\%Selected Animal%\%Selected Animal%. – ESmith Aug 11 '17 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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