Validate a model within a model

2391
3
03-23-2016 03:57 PM
MichaelChapiesky
New Contributor II

I am learning python and model building in 10.0.  I have a model that I want to put inside another  model so the whole process can run continuously.  My problem is that model within a model needs to be validated after the first part of the model runs, as it is relying on newly named data. 

Is there script or somewhere in the model that it can be set to validate during the process?

I would even be happy with re-validating the model while it is running and put the two tools from the model within a model instead if possible.

I do not know if  need to set a parameter or environment, but there has to be a way.

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

I would contemplate the need to run everything all at once.  Is the process one sequence after another? or one sequence runs within the other?  There is a difference.  If you are appending the outputs of one to the inputs of another, then you shoul be able to combine them directly and verify  once.  If you are running one within another, then you shoul be able to verify that the inputs and outputs work.  Are you running into difficulties?  My preference would be to run them separately, even if one model is used to produce output which becomes input to another model.  In this way, you can run each model in isolation to compare results and the effect of changing input parameters (if they have in influence)

  1. run A   output from A used in B
  2. run B  B uses A to produce C
  3. run B, the A bit, the rest of B to produce C

option 1 means you can just experiment with A

option 2 you can vary B stuff keeping A fixed

option 3 in order to examine the affect of anything, you have to run the whole model, that is... if you want to examine the affects of A within B (for example, raster cell size, projection, something that is important), you have to run the big'o-rama model each time (option 3). 

0 Kudos
DanPatterson_Retired
MVP Emeritus

moved to modelbuilder by someone

0 Kudos
MichaelChapiesky
New Contributor II

Dan,

Sorry it has taken me to get back to you, too many things going on at once.

This issue goes back to my first question you answered for me concerning renaming locators.

When I am copying the locator to the new gdb, I want to delete the old named one.

So since the old one locator is not in the newly copied gdb, when the model hits the delete tool in process, it will not go any farther as it was not there when the tool started running.  I'm running the model from a saved point where I had saved the model with the old locator named in the gdb, but deleted it out after validating and saving the whole model.

A work-a-around I found is to copy the locator in the original gdb and delete the old before copying the gdb over to the new folder.

If this makes, sense. But I'm still wondering how to validate a model in model, if the data in the model in a model needs data from previous tools being run to make it work.

0 Kudos