Auto locate an input feature class in model builder

151
2
Jump to solution
11-05-2018 06:38 AM
CarlTownsend1
New Contributor III

Is it possible to get a feature class setup as a parameter in such a way, that the user just types in a fc name (without having to navigate to the geodatabase to create it) and the script automatically links it to the folder and geodatabase and creates it? I've tried setting it up and looking at it and ought to work e.g. creating a fc parameter and in the output having the paths as variables i.e %folder workspace%\%database workspace%\but everytime it just errors out and I have to manually navigate to the geodatabase and create the fc in there. just trying to make things as simple as possible for the end user.

Thanks

0 Kudos
1 Solution

Accepted Solutions
StephenM
Occasional Contributor II

You might just want to use a String parameter instead of a Feature Class parameter. It works for me if for the "output feature class" field I do something like %Workspace%\%Name of Feature Class to Create%, where Workspace is a Workspace variable and Name of Feature Class to Create is a String variable.

View solution in original post

2 Replies
StephenM
Occasional Contributor II

You might just want to use a String parameter instead of a Feature Class parameter. It works for me if for the "output feature class" field I do something like %Workspace%\%Name of Feature Class to Create%, where Workspace is a Workspace variable and Name of Feature Class to Create is a String variable.

View solution in original post

CarlTownsend1
New Contributor III

Thanks so much! Setting the variable to a string parameter  instead of a fcparameter worked. Just what I wanted!

0 Kudos