Select to view content in your preferred language

Attributes rule

3720
11
05-28-2013 10:21 AM
LukeCzar
Deactivated User
Hi Matthias,


Quick question, we use the gdb file with attributes already inside each room,  for instance, one floor has lower walls the other upper - in attributes, so we would like to create a new rule that would extrude lower walls 2feet and upper 4 feet, how do we use python to make the program read from the attributes that are already in gdb ?



?ukasz
0 Kudos
11 Replies
MarcoPesci
Deactivated User
Hi Matthias,

Hope this thread finds you well,

I'm relatively new to CE and CGA Rules and was wondering what my rule should be to let the program know to extrude not a fixed number but the number in the attribute.
i.e --> Buildings with floors. Some buildings have 10, some have 3. I want to apply 1 rule to the whole map and have the correct height for each building.

Thanks!
0 Kudos
JoanneO_Brien
Deactivated User
Hi

Do you know the heights of the building, or the number of floors of the building?

If it's heights you'd want something like
 attr height = 0  #this looks at the height attribute in your building parcel (note the same should be exactly the same as that in the object attributes
attr floor_height = 3.8 #value here should be the height each floor is

Lot-->extrude(height) Building

Building-->comp(f){side : Facade | top : Roof}
Facade-->split(y){{floor_height : Floor }*| ~1 : Wall} # what this does is split the building up so that based on the building height it creates the floors 


If you have the number of floors it's similar to the heights but:
attr number_floor = 0 #again same name as what's in your object attribute
attr floor_height = 3.8 #use what ever average floor height you want here
attr building_height = number_floor*floor_height #this determines the building height based on the other factors

Lot--> extrude(building_height)
etc.


hope that helps 🙂
0 Kudos