Hi,
i'm trying to get Infraworks automatically assigns roof heigths based on square meters. For example, a building larger than 400 m² is an industrial building so it needs to have a flat roof. but buildings smaller than 400m² are houses, so they should have a saddle roof.
is there a script or a simple way to do this with infraworks?
Assuming that you have an attribute with the square meters in your building file you can simply do this:
Import teh buildings and map the area to a field in the "table" tab of the configuration dialog. i used "ROTATE_X" to map the area.
Then go to the "scripting" tab and enable it to be edit able.
Scroll down till you find this:
function Process(SOURCE, BUILDINGS) {
BUILDINGS.BASE_COLOR = randomFacadeColor();
BUILDINGS.EXTERNAL_ID = SOURCE["FeatId"];
BUILDINGS.MODEL_ROTATE_X = SOURCE["AREA"];
And replace
BUILDINGS.ROOF_HEIGHT = xx;
with this:
if( BUILDINGS.MODEL_ROTATE_X <= 100)
{BUILDINGS.ROOF_HEIGHT = 10;
}
else if( BUILDINGS.MODEL_ROTATE_X >100 && BUILDINGS.MODEL_ROTATE_X <= 200)
{ BUILDINGS.ROOF_HEIGHT = 20;
}
else
BUILDINGS.ROOF_HEIGHT = 30;
Hope this helps.