Create Feature Activation Rule

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.

  1. On the ribbon, click Manage tab iLogic panel Add Rule .
  2. 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.

  3. Enter the If statement for this rule.

    Copy Code Block

    If chamfers = True Then
  4. 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.

  5. 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.

  6. Click OK to accept the rule. If no error messages appear, the rule can be tested.

Test the Feature Activation Rule

  1. On the ribbon, click Manage tab Parameters panel Parameters .
  2. 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.
  3. Now, change your Equation selection to True. The chamfers are activated.

Previous | Next