InfraWorks General Discussion

InfraWorks General Discussion

Reply
New Member
Galeazzi1
Posts: 1
Registered: ‎02-17-2014
Message 1 of 2 (271 Views)

Roof height based on square meters

271 Views, 1 Replies
02-17-2014 01:26 AM

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?

Employee
lippola
Posts: 45
Registered: ‎12-17-2010
Message 2 of 2 (249 Views)

Re: Roof height based on square meters

02-17-2014 05:38 AM in reply to: Galeazzi1

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.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.