Hallo,
I'm trying to create a model that uses values from a single table, in order to perform a different calculation for each raster in a file.
Each raster is represented in the table by a row that contains the raster unique name (string), and 2 other fields with the numeric values for the calculation (slope & intercept).
I use "Iterate rasters" to go through the files, and "Table Select" where I select the relevant row for the parameters, by using %Name% (from the iterator) = name (the raster name in the table).
Doesn't work... the model gets stuck in the "Table Select" stage.
Does anyone have any idea why?
I attached python code and image of the model.
Thank you!
Solved! Go to Solution.
Okay try this:
Add a Calculate Value tool in to calculate a valid name for the output table the code would be
"%Name%".split(".")[0]
Then change the output table name to t_%TableName%
It would probably be best if you upload the actual model builder tool and not a python export of the tool. Thanks.
Is your table that you are selecting from in a local geodatabase or file system?
Have you tried putting single quotes around the %Name% in the selection expression?
the table is from a local geodatabase
Then maybe try taking the double quotes off the field name:
name = '%Name%'
Did not work, sorry ...
Could you post a sample of your data? Maybe a raster and the table you are working with? Also could you post a screen shot of the error your are getting?