0

I have a parent model with a submodel nested in it and tools outside the submodel but within the parent model that connect to the submodel. In the submodel, the first tool is "create geodatabase". In the parent model, the last tool deletes the gdb. When the model is run (not edit), it looks like the model validates before running and comes up with the error that it cannot find the gdb to delete at the very end. Obviously this is because the gdb has not yet been created at the beginning of the model. Is there any way to get around this where it would not validate before running?

1

Well, the big question is, do you have the created geodatabase set as an output parameter of the submodel? If so, you should (at least in theory) be able to link that submodel output within the parent model to the delete tool and it should validate. Don't use direct file paths if you can connect tools.

I moved this comment to an answer so you can mark it as accepted and it'll remove the question from the "unanswered questions" list on the site.

| improve this answer | |
  • user2856159, I'm following up on this topic because I'm having a similar issue with two submodels in a parent model. The output from submodel A is set as model parameters and outputs to submodel B. The parent model does not validate and when run gives an error saying "input features could not be found". I assume this error is being caused by submodel B because submodel A has not yet been run and hence submodel B has no input. I've tried preconditions as well and have not able able to get the parent model to validate – Steve Feb 19 '14 at 13:53
  • Another thing I'd look at is the details of what it has listed in the model for the input that is says is missing. What I mean is, look if it that missing input is listed as another variable in the model (relative input), or if it is a fully fledged file path (ex: C:\data\...\foo.shp). Most tools take relative, but if it is a fully fledged file path requiring tool, even if you have the inputs set, it still isn't going to validate. For situations like that I've had to create an empty placeholder file that is deleted within the model and replaced with correct data or similar workflows...sorry – John Feb 19 '14 at 15:33
  • Thanks for replying. Since submodel B had just the "Export to cad" tool, I removed the model and nested the tool w/in the parent model so now i have submodel A and export to cad nested in the parent model. I then made sure that the inputs to export to cad were variables (blue arrows in triangle shape) vs. absolute paths. Still not having any luck validating and running the model. I will continue fighting the good fight :) Thanks for your help on this! – Steve Feb 19 '14 at 17:51
  • FYI, I've found out from previous discussions about the Export to CAD tool that it doesn't run correctly when any of the input feature classes are empty. What worked in that case was the person copied all the input feature classes to a temp File GDB and then used the GDB as the input to the tool (workspace input containing all feature classes rather than input of individual feature classes). Don't know that this is your issue, but since you mentioned the tool, thought I'd mention a similar issue I've heard of. Good luck – John Feb 19 '14 at 17:55
  • Thanks user, thats how I have the model setup, however, before the model is run, it does not like that those empty feature classes do not exist yet and therefore it fails to validate. The feature classes are created at the very beginning of the model. – Steve Feb 19 '14 at 18:40

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.