Select to view content in your preferred language

Rasters failing to load in ModelBuilder when set as snap raster

253
2
03-20-2024 07:00 AM
ChristopherBeal
New Contributor

Hello. I keep running into errors with snap raster datasets in ModelBuilder in ArcPro 3.2. I'll set a raster dataset as a snap raster in operations like Mosaic to New Raster and Extract by Mask. The model will run correctly once, but upon rerunning the model suddenly doesn't see the input as a raster dataset and the model fails. If the snap raster is in a submodel, it may run correctly in the submodel but breaks in the main model. If you remove and add the dataset back into the model and reattach the connections, it works again—one time. I've seen various error codes thrown ("ERROR 010340: Snap raster %1 does not exist" and "ERROR 000840: The value is not a Raster Dataset." most frequently). It occurs reliably whether the snap raster is set in the environment settings for the model or if it's put into the model and connected as the snap raster. This issue has only cropped up in the last few months in models that have worked without issues for years. I'm really hoping there's a workaround or best practice I'm missing.

0 Kudos
2 Replies
DanielFox1
Esri Contributor

Hi @ChristopherBeal 

Did you upgrade your ArcGIS Pro? If so, from what version?

Have you had any changes to your licencing or device/security settings etc?

Does this workflow work outside Model Builder?

To clarify, the error messages you are getting I have included the relevant documentation below 

ERROR 010340: Snap raster %1 does not exist 010340: Snap grid <value> does not exist; No snapping.—ArcGIS Pro | Documentation

ERROR 000840: The value is not a Raster Dataset 000840: The value is not a <value>.—ArcGIS Pro | Documentation

There have been some other community articles that have seen the error 000840 before, with a solution, I appreciate that they are using Python but have a look at any of your settings in your model incase there is something either selected or not selected:

Solved: ERROR 000840: The value is not a File. Failed to e... - Esri Community

Solved: SelctbyAttributes - Esri Community

0 Kudos
ChristopherBeal
New Contributor

Thanks for your response. To answer your questions:

I upgraded directly from the previous version (3.2.1).

No changes to licensing or device settings I'm aware of.

The workflow works fine outside of ModelBuilder (running the same tools one at a time in the geoprocessing pane). It works in ModelBuilder too—once. It's when it's rerun that the snap raster input is no longer seen as a raster in ModelBuilder and I'll get one of those errors. I have to copy in the same dataset and remake all the connections in ModelBuilder. Then it will run—once. Which, of course, kind of defeats the point of modelling it.

I reviewed the solutions you attached, but they don't seem to address my issue.

0 Kudos