Script for roof slope

Script for roof slope

pekka.suni
Observer Observer
367 Views
0 Replies
Message 1 of 1

Script for roof slope

pekka.suni
Observer
Observer

Greetings.

 

I am trying to figure out how to make a script that sets the roof slope to 25 for the buildings with 1 and 2 floors only. Buildings with 3 floors and above would have roof slope 0. So far I have tried several things such as:


"Substr(ToString(LUOKKA), -1, 1) == "1" ? 25 : 0"
"LUOKKA.slice(-1) === "1" ? 25 : 0"
"(toString(LUOKKA).slice(-1) === "1") ? 25 : 0;"
"(I_KERRLKM === 1 || I_KERRLKM === 2) ? 25 : 0"

And:
if (SOURCE["LUOKKA"].slice(-1) == "1") {
     BUILDINGS.ROOF_SLOPE =
25;
}
else {
     BUILDINGS.ROOF_SLOPE =
10; }

Any help is appreciated.

0 Likes
368 Views
0 Replies
Replies (0)