Dear all,
I have set up a workflow in model builder, with several variables set as parameters.
Thus, for example the cell size of my initial raster (a parameter) is used for further calculations in SQL commands. Executing the model with the actual cell size put into the calculations manually by me works fine, whereas using "%CellSize%" produces an error.
Did anyone encounter a similar problem or has an idea for a solution? For the sake of user-friendliness it is vital that the variables function as parameters.
Thanks in advance.
Can you post a screenshot or more details about your model? What is the error you are getting?
Yes sure, these are what's in the command (cost grid) and the error. Tell me if you need more information.
This looks quite complicated, wouldn't it be a idea to export your model into python code.
In my opinion you would have better control about your variables ... ?
The model itself is also quite complicated, so I find the better overview provided by model builder advantageous. Also, I am not too familiar with python coding.
And if it is not a bug in model builder, there should be a way to get this to work shouldn't it? I'm just running out of ideas
How are you actually pulling out the CellSize from your initial raster?
It's just a 'cell size' variable with the input being the DEM. I am then using it as I would use an 'any value' variable. Same with the "%ElevationDifference%".
Try removing the quotations from around %Cell Size% as it is a number and not a string.
Hm, it tried, but now it says it is an invalid SQL statement
Is the "invalid SQL statement" error occurring on the Raster Calculator or somewhere else in the model?