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?!
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.Sign up to join this community
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.
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.