Working off two previous posts, Object Data 101 (Part 1) and Themes using Object Data 101 (Part 2), we will be applying specific styles based on attached data. This post is not to be confused with Rob Widerman's on Style Rules in InfraWorks post, where styles are randomized. We will be assigning styles deliberately by creating a rule set and expressions that call for the road type and then setting a style to control the roadways appearance.
In this post we will be leveraging the connected streets class: Local, Major, Minor, Collector. In the Data Source Configuration dialog box, under the General area Description field the "FCLASS" attribute is read.
From the Intelligent Tools area > click on the orange "I" > this will expand a horizontal set of tools > click on the Create and Manage model button (the rubix cube looking one) > this will expand a collection of vertical tools to the left > click on the Styles Rules button to open the needed palette.
From the Style Rules palette > select the Roads tab > click on the green "+" Add Style Rule button > and set the name for the rule.
This will add a new row in the box > double click on that line item to open the Rule Editor dialog box > click on the Edit button. This will open the Create Filter Expression dialog box.
From the Create Filter Expression dialog box, from the left panel Properties area > expand Common collection > and double click on DESCRIPTION (this will push it to the center box). Next from the middle box, add the "=" to the end. Then from the far right window pick on the drop down to select the InfraWorks property that you wish to use. From the Provided list select the property to be used. Click OK button to exit.
Next the desired style will be assign to this rule that is being driven by the expression. From the Rule Editor dialog box > from the lower portion of the widow in the Styles area > click on the green "+" Add button > From the dialog box select the desired style, exit out by picking the OK button to exit out.
Repeat the process creating the number of rules to address all the available feature types. When done pick on the green Run Rules button in the lower right of the palette. This might take a bit to process if a large data set is being used.
After the rules have been applied the streets will update automatically. Using the connected attribute data, this idea can be applied to other connections such as pipes, parcels, etc.
If this is a set of rules are to be used in other models or proposals, it is possible to export out the rules in a .XML file format. The saved rule set can be imported.