norkron@gmail.com

Upgrading from 2011 to 2012 - problems

Discussion created by norkron@gmail.com on Feb 12, 2013
Latest reply on Feb 12, 2013 by MBuehler-esristaff
I've just upgraded to 2012, then first thing was to open the project I'm working on.

For some reason all the mapping layers I've had working on 2011 don't seem to work in 2012. The 'inspector' lets me select 'by layer attribute' and let me pick from the list the right attribute but then the value assigned is just 0 (zero).
My model uses mapping quite extensively both for block and shape creation parameters. Now I can't run my model and bit stuck.

My mapping layers pick one colour of 27 off my colour chart (attached) and selects the corresponding number based on the range it is in (so everything similar will be assigned to the nearest value), the 'inRange' routine does that.

Here's a sample of my mapping layer code:

// map red[0..1] to aRed[0.0...1.0]
attr aRed = map_01(red, 0.0, 1.0)

// map blue[0..1] to aBlue[0.0...1.0]
attr aBlue = map_01(blue, 0.0, 1.0)

// map green[0..1] to aGreen[0.0...1.0]
attr aGreen = map_01(green, 0.0, 1.0)

inRange (input, range) =
case abs(range-input) < 0.25 : true
else : false

attr type =  
case inRange(aRed, 0) && inRange(aGreen, 0) && inRange(aBlue, 0) : "Offset Subdivision" //1
case inRange(aRed, 0) && inRange(aGreen, 0.5) && inRange(aBlue, 0) : "No Subdivision"  #2
case inRange(aRed, 0) && inRange(aGreen, 1) && inRange(aBlue, 0) : "Offset Subdivision" //3
case inRange(aRed, 0.5) && inRange(aGreen, 0) && inRange(aBlue, 0) : "Recursive Subdivsion" //"Offset Subdivision" //4
case inRange(aRed, 0.5) && inRange(aGreen, 0.5) && inRange(aBlue, 0) : "Recursive Subdivsion" //5 #industry
case inRange(aRed, 0.5) && inRange(aGreen, 1) && inRange(aBlue, 0) : "Offset Subdivision" //6
case inRange(aRed, 1) && inRange(aGreen, 0) && inRange(aBlue, 0) : "Skeleton Subdivision" //7
case inRange(aRed, 1) && inRange(aGreen, 0.5) && inRange(aBlue, 0) : "Skeleton Subdivision" //8
case inRange(aRed, 1) && inRange(aGreen, 1) && inRange(aBlue, 0) : "Offset Subdivision" //9
case inRange(aRed, 0) && inRange(aGreen, 0) && inRange(aBlue, 0.5) : "Offset Subdivision" //10
case inRange(aRed, 1) && inRange(aGreen, 1) && inRange(aBlue, 0.5) : "Skeleton Subdivision"  #18
case inRange(aRed, 0) && inRange(aGreen, 0.5) && inRange(aBlue, 1) : "Offset Subdivision"  //20
case inRange(aRed, 0.5) && inRange(aGreen, 0.5) && inRange(aBlue, 1) : "Offset Subdivision" //23
case inRange(aRed, 0.5) && inRange(aGreen, 1) && inRange(aBlue, 1) : "Offset Subdivision" //24
case inRange(aRed, 1) && inRange(aGreen, 0) && inRange(aBlue, 1) : "Offset Subdivision" //25
case inRange(aRed, 1) && inRange(aGreen, 0.5) && inRange(aBlue, 1) : "Offset Subdivision" //26
case inRange(aRed, 1) && inRange(aGreen, 1) && inRange(aBlue, 1) : "Offset Subdivision" //27
else: "No Subdivision" //0


I've doubled check that the image is still there and that its within the graph boundaries.

I've tried to create a NEW mapping layer which seem to work but I've tried with a static assignment: attr type="Recursive Subdivsion". Is it possible that we can not anymore use routines within mapping layers

Any ideas ?

p.s. did anybody notice the typo in the 'Recursive Subdivsion' ??? - its missi

Attachments

Outcomes