Applying Conditional Attributes
In order to apply conditional attributes from an external database you will need to use the Intelligent Objects Editor.
Applying Conditional Attributes
Saving the Settings
Removing Conditional Attributes
Exercise
Applying Conditional Attributes
- Load the
HAUL_ROUTE
layer, which should have been created through the Getting Started tutorial. If this layer has not been created, then you will need to complete the Getting Started tutorial before continuing. - Select Tools > Preferences.
- Under the Vulcan : Graphics section of the Preferences interface, select the Update Intelligent Objects check box and set the Update Delay to 15000 milliseconds (15 seconds). This setting is required to update the dynamic positioning.
Figure 1 : The Update Intelligent Objects preference
If the Update Intelligent Objects check box is not selected, then the attributes will be updated statically only upon initiation of tools in the Intelligent Objects Editor. - Select Design > Intelligent Objects > Intelligent Objects Editor.
- Go to the Database section of the Intelligent Objects Editor interface.
- Select ‘
Intelligent_Objects
’ from the Data source drop -down list. If you cannot select this, then an ODBC data source does not exist. Refer to the ODBC Interface documentation for steps on how to set up an ODBC link.Figure 2 : Specifying the Data Source
- Go to the Types section of the Intelligent Objects Editor interface and select the Apply Conditional Attributes option.
Figure 3 : Applying Conditional Attributes
- Click the button in the Attributes column. From the displayed panel, select the following.
Figure 4 : The Attributes panel
Once the attributes have been selected, click OK. - Select the button in the SQL Statement column. Through the displayed panel, construct the following statement:
Select * from Haulage_Information where haulage_route = ‘$NAME’
Haulage_Information
table where the value in the fieldhaulage_route
is equal to an object’s name.To construct the statement;
- Click Columns. From the displayed panel, enter '*' in the first field of the first row.
- Select
Haulage_Information
from the drop-down list. - Click Build to construct the remainder of the statement.
Once the SQL statement has been entered, click OK.
- Click the button in the Conditions column. From the displayed panel, select the following.
Figure 5 : The Condition Schema panel
The first condition selects all objects where theAVG_CYCLE
field in theHaulage_Information
table is greater than20.
It then assigns the Group attribute ofCYCLE>20
to the matching objects, colours them blue and changes the line style to a dashed style.
The second condition selects all objects where theAVG_CYCLE
field in theHaulage_Information
table is less than or equal to20.
It then assigns the Group attribute ofCYCLE<=20
to the matching objects, colours them orange and changes the line style to a dashed style. - Click Apply and select Polygon from the displayed dialog box.
- From the Multiple Selection box, select the Layer selection method followed by one of the design objects contained in the
HAUL_ROUTE
layer. - Right-click twice to return to the Intelligent Objects Editor interface. This will initiate the update of the conditional attributes tool and the objects should change colour and line style (as shown in following diagram).
Figure 6 : Colour and Line style Attributes Dynamically Updated
Saving the Settings
- Go to the Save Specification section of the Intelligent Objects Editor interface and enter
Conditional_Attributes
in the Specification file field.Figure 7 : Saving your Settings to a Specification File
- Click Save and close the Intelligent Objects Editor interface.
The resulting specification file will be stored in your current working directory. This specification file, which can be opened and viewed through a text editor, holds the panel settings for the Intelligent Objects Editor interface and can be reloaded at a later time.
To check that the Group attribute has been altered for the objects, click the Information button (on the Status toolbar), followed by the ROUTE_1
object.
The following should be displayed in the Report Window:
Figure 8 : Report Window Output
Open the Haulage_Information
table in the Intelligent_Objects
database. Change the value of the AVG_CYCLE
field for ROUTE_1
to 21.
Figure 9 : Updated values for Haulage_Information table
Close the table and return to Vulcan. Within 15 seconds the object will change its attributes to be blue and dashed with a Group attribute of CYCLE>20.
This dynamic update occurs due to the Vulcan preference being set to update intelligent objects. Removing this setting will make the update static so that it will only occur while applying the conditional attributes.
Removing Conditional Attributes
- Go to the Types section of the Intelligent Objects Editor interface and click Remove.
- From the Remove Data dialog box, select the Conditional Attributes option followed by the Polygon entry.
- From the Multiple Selection box, select the Layer selection method followed by an object in the
HAUL_ROUTE
layer. Right-click twice to return to the Intelligent Objects Editor interface. - Return to the
Haulage_Information
table and change the value of theAVG_CYCLE
field forROUTE_1
back to15.5.
You will notice thatROUTE_1
won't be updated as the conditional attributes have been removed.
Exercise
Apply Conditional Attributes to the HAUL_ROUTE
layer for the following attributes and conditions:
- Colour the object red and set the line style to double thickness where the
LOAD_SPEED
value in theHaulage_Information
table of the external database is greater than 38. - Colour the object yellow and set the line style to double thickness where the
LOAD_SPEED
value in theHaulage_Information
table of the external database is less than 38.