6

We are working on the creation of a tool with ModelBuilder in ArcGIS Desktop 10.1. We want to build a generic tool that can be launched from any computer. In order to do so, we have set the input files as parameters in the model. When launched from the Toolbox, the paths on our computer come up in the parameter boxes. The user can change them, but we would like to have blank boxes instead.

To do so, we delete all relative path of the parameters in the model. When we test the model in ArcMap, we get the following message “Error Warning 000873” which says that our workspace does not exist. Also we have a second kind of error: “ERROR 001000” which means that some value of zone field does not exist.

Is there anyone who has executed this operation with success and could explain us the right way of process?

1

1 Answer 1

10

To get the result you are looking for you need the inputs in your model to be empty when you save it and they both need to be set as parameters. Do this by right clicking on them in model building and choosing 'Model Parameter'.

You can set up everything else, but leave the input and/or target parameters blank. Then when you open the tool the user will be asked to set the parameters.

You want them to look like this:

Set up the input and target to be parameters by right clicking on them:

And then when the user opens the tool it will look like this:

Set up the input and/or target to be parameters (Picture 1) and they will show up as options for the user (Picture 2)

Regarding the error messages you are seeing, my thought is that somewhere in your model you are referencing a workspace that exists on the machine where the model was built, so when you move to a different machine that workspace path does not exist.

Without knowing more specific details about the model you are working with it's difficult to debug further. If it were me, I would go through each tool in the model and make sure that all the environment settings are such that they will operate independent of variables that are specific to each users' computer.

2
  • Concerning the file structure of our model: At the beginning of our model, we have the tool "Create a file Geodatabase" with a set name and a Folder as parameter. In the toolbox, the user gives a Folder and the geodatabase with a fixed name is created inside it. All our treatements have the following outing: %Folder%\fixedname.gdb\layername Is that the correct way of doing things? Commented Dec 4, 2012 at 17:20
  • It's difficult for me to say without seeing the whole model. I would try creating a parameter variable that sets the workspace in the 'Create File GDB' tool. (Right click on the tool, 'Make Variable', 'From Environment', 'Workspace', 'Scratch Workspace') At least that way you can make sure that the workspace that is being referenced exists.
    – Kevin
    Commented Dec 4, 2012 at 17:52

Your Answer

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

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