Community
InfraWorks Forum
Welcome to Autodesk’s InfraWorks Forums. Share your knowledge, ask questions, and explore popular InfraWorks topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Roof height based on square meters

1 REPLY 1
Reply
Message 1 of 2
Galeazzi1
777 Views, 1 Reply

Roof height based on square meters

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?

1 REPLY 1
Message 2 of 2
lippola
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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report