Select to view content in your preferred language

Extruding polygons using attribute

533
2
05-31-2024 04:23 AM
aogino
by
New Contributor

What is the right .cga rule to apply to a shapefile in order to extrude the polygons in it to a height using an attribute of the shapefile ? 

Currently using this one that I found on the net : 

version "2023.1"

attr hauteur = 10 // Default value in case the attribute is missing

Lot -->
extrude(hauteur) // Extrude the shape to the height specified by the "hauteur" attribute

@StartRule
Building --> Lot

 

But it isn't working. Any kind of help would be appreciated ! 

0 Kudos
2 Replies
ThomasFuchs
Esri Regular Contributor

Hello @aogino 

Your CGA code compiles without error. When applying it to a shape, the resulting model is the shape extruded by 10m.

ThomasFuchs_0-1718189831009.png

 

0 Kudos
DevinLavigne
Frequent Contributor

Your attribute title "hauteur" needs to match (case-sensitive) to the object's attribute for this to happen automatically. Otherwise you need to simply "Connect to Attribute" and everything should work as intended.

0 Kudos