I am using ModelBuilder for ArcGIS Desktop 10.2

I have the following code in the Raster Calcualtor which works in some cases but not in others.

Int(Con(IsNull("%A%")|"%A%"== 0,"%B%",float(%Max%) + "%A%"))

In cases that A is Null I want the code to return the value from B however it is returning a Null. I suspect there is a flaw in the OR syntax but I can't work out what is wrong.


The problem is in the OR expression. A nested Con() statement works

Int(Con(IsNull("%A%"), %B%, Con("%A%"==0, %B%, float(%Max%) + "%A%")))

Your OR expression seems to be evaluating to NoData and receiving NoData as output. See the help here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.