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: 

Roofslope based on name

1 REPLY 1
SOLVED
Reply
Message 1 of 2
henrilatour7900
424 Views, 1 Reply

Roofslope based on name

Hi,

 

i'm trying to get Infraworks automatically assigns roof slopes based on the name property.

 

For example,

 

a building has the name property "House" and needs a roofslope of 33.

a building has the name property "Office" and needs a roofslope of 0.

etc.

 

It should be something like:

if( BUILDINGS.NAME === "House")

{BUILDINGS.ROOF_SLOPE = 33;}

else if(BUILDINGS.NAME === "Office")

{ BUILDINGS.ROOF_SLOPE = 0;}

else

BUILDINGS.ROOF_SLOPE = 10;

 

Can anyone help me with the script to do this with infraworks?

1 REPLY 1
Message 2 of 2
jutters
in reply to: henrilatour7900

You've pretty much everything sorted already you'll need -- just bring this script to life by:

1. Open the "Data Source Configuration" dialog for the data source providing the feature data (buildings).
2. Go to the "Script" tab
3. Click the "Edit" button to enable import script customization (the current script you see results from all settings made on all the other tabs - so be sure the 'Name' property is properly mapped already).
4. Include your script snippet within the Process() function.

Done - depending on the "Name" property the imported buildings feature should have different "Roof Slope" values applied and generated accordingly within the scene.

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

Post to forums  

Rail Community


Autodesk Design & Make Report