Now, we create a second rule to control the activation of the chamfers on the bracket. Previously, we created a Boolean-type parameter labeled chamfers. The two possible values for a Boolean parameter are True and False. We will use these values to turn chamfers on and off.
- On the ribbon, click
Manage tab
iLogic panel
Add Rule
.
- Name the new rule Chamfer_Rule, and click OK to open the Edit Rule dialog box.
The first part of the rule states that if the value for the Boolean parameter chamfers is true, then the chamfers feature is activated.
- Enter the If statement for this rule.
Copy Code Block
If chamfers = True Then
- From the Snippets area, insert a copy of the IsActive snippet (Feature.IsActive) into your rule. In the inserted snippet, replace featurename with Chamfers, and set the statement to True.
Copy Code Block
If chamfers = True Then
Feature.IsActive("Chamfers") = True
The second part of the rule states that when the value of the chamfers parameter is False, the chamfers are deactivated.
- Add an Else statement, and use the Copy and Paste commands to create the second part of the rule. Complete the rule with an End If statement.
Copy Code Block
If chamfers = True Then
Feature.IsActive("Chamfers") = True
ElseFeature.IsActive("Chamfers") = False
End If
The rule is complete.
- Click OK to accept the rule. If no error messages appear, the rule can be tested.
Test the Feature Activation Rule
- On the ribbon, click
Manage tab
Parameters panel
Parameters
.
- In the chamfers row, click in the Equation field to enable the multi-value drop-down, then click the arrow and select False. Notice that all chamfers are deactivated.
- Now, change your Equation selection to True. The chamfers are activated.
Previous | Next