0

Im using Model Builder to try and create a GDB with 3 Datasets.

I would like the GDB to either be placed within the folder that the .mxd is saved, or I'd like a prompt, for where to save it.

Can anyone help?!

Model

2

1 Answer 1

2

You could use the Parse Path (ModelBuilder) tool with the input being your MXD. The resulting PATH will be your input to the Create File GDB (Data Management) tool. Below is a simple model showing this. It seems that you cannot use the output value from the Parse path tool as a direct input into the Create File GDB tool. This is probably because the File GDB Location parameter is expecting a file data type. Just use inline variable substitution and connect it as a precondition.

Example Model

Full Size

This would be a method to use if you do not want to user to manually specify the location where the GDBs will be created and they are already supplying an MXD to the tool. Look for @KHibma's comment on your original question for asking the user where it should be saved in the form of a model parameter.

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.