I'm attempting to add rasters to a new mosaic dataset in a new file geodatabase, all in the same model. However, the Add Rasters To Mosaic Dataset tool does not recognize the NewMosaicDataset or the NewGDB.gdb because they haven't been created yet. The first time the model is run, the geodatabase and mosaic dataset are created but no rasters are added, but the Add Rasters tool then recognizes an existing geodatabase and mosaic dataset. The second time running the model is unsuccessful because the geodatabase already exists and it will not overwrite it.
This is the error produced when I open the Add Rasters To Mosaic Dataset tool.
(Ignore the digit 1 after NewGDB in the error message, I simply entered a new output name in order to take a screenshot of the error message I receive)
I have attempted to set the output mosaic dataset as a precondition as well as exporting the model to a Python script and adjusting variable names, but both attempts were unsuccessful for the same reasons described above.
Would like to know how to do all of this in one model.