InfraWorks General Discussion

InfraWorks General Discussion

Reply
New Member
henrilatour7900
Posts: 1
Registered: ‎11-30-2010
Message 1 of 2 (134 Views)
Accepted Solution

Roofslope based on name

134 Views, 1 Replies
02-20-2014 04:33 AM

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?

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.
Active Contributor
jutters
Posts: 42
Registered: ‎04-15-2013
Message 2 of 2 (122 Views)

Re: Roofslope based on name

02-20-2014 05:54 AM 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.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!