Upgrading from 2011 to 2012 - problems

652
3
02-12-2013 04:40 AM
TalAisenberg
New Contributor III
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
Tags (2)
0 Kudos
3 Replies
MatthiasBuehler1
Frequent Contributor
Hi !

The typo is fixed meanwhile and will be in the next update.

Many things have changed in the Inspector's heuristics between 2011 and 2012, thus it's well possible that some mappings are lost. 😞

Best is to check the attribute sources and relink them again.

Let me know if you face more issues with this ..

M.
0 Kudos
TalAisenberg
New Contributor III
Ok,

Tried to re-link the mapping layer. It identifies the layer and attributes in the selection box but when I assign them it comes with the value 0 for all instead of the value assigned by the mapping layer. in the block inspector properties it says : '0 (typology)' (which by the way crashed the PC as it was trying to sub-divide a few thousands of blocks into little tiny shapes which resulted in several millions of shapes - crash.

I've also tried assigning 'default' values, then re-selecting the blocks and re-assigning 'by layer'  but still it ignores it and assigns 0 to all. Strange

Any more idea?

T
0 Kudos
MatthiasBuehler1
Frequent Contributor
the actual mapping in the typology layer is still there ? that code is intact or is that missing ?

if the value is always 0, the mapped value cannot be found.

it may help me you send a series of screenshots of all important details to my mail address .. ok ?

m.
0 Kudos