An Introduction to Autodesk Inventor iLogic – Part One – 20

Remove the Multi-Value List for the Mass parameter -Summary

Now set the mass to 150. The bracket width is now 2 inches.

 

Changing the iLogic parameters to test the new rules.

Change the mass to 250. The width changes to 3 inches. When mass = 350, the width of the bracket is 4 inches. Entering any mass value greater than 400 results in bracket width of 6 inches. Verify this by setting the mass to 1500.

 

Summary

In this introductory exercise we have covered the following topics.

The Parameter Editor

  • Creating User, Boolean and String Parameters
  • Creating Multi-Value Parameters
  • Key Parameters as search filters
  • Modifying Parameters

The Rule Editor

  • Creating rules
  • Conditional Statements
  • Activation and deactivation of features
  • Driving part dimensions with a rule
  • Modifying an existing rule

These exercises have covered just a few of the many capabilities of Inventor iLogic. To learn more about iLogic, we suggest that you take time to complete the remaining tutorials provided.

 

1234567891011121314151617181920

 






An Introduction to Autodesk Inventor iLogic – Part One – 19

Remove the Multi-Value List for the Mass parameter

The last step is to modify the User parameter called mass. It is currently a Multi-value parameter. We can remove the Multivalue list associated with this parameter by editing the multi-value list.

Right-click an empty cell in the mass row and select Edit Multi-Value List from the context menu.

 

Changing the the iLogic parameter to a Multi-Value parameter.

Select all of the values in the “Value” list, and then click the Delete Selected Items button.

 

Deleting iLogic values using the Value Editor List control

Click OK to accept the change. Notice that the mass parameter no longer has a multi value list to select from.

 

Test the modified rule

In the Parameter Editor, enter a mass value of 75. The width of the bracket is set to 1 inch.

 

Testing the modified iLogic rule using the iLogic Parameter Editor

 

 

 

 

1234567891011121314151617181920

 






An Introduction to Autodesk Inventor iLogic – Part One – 18

Testing the iLogic Rukes for Ranges of Values

What about cases where mass is not limited to the exact values but may occur in several ranges of values? The following example will illustrate this case.

Mass Range Width
Less than or equal to 100 1 in
Greater than 100 but less than or equal to 200 2 in
Greater than 200 but less than or equal to 300 3 in
Greater than 300 but less than or equal to 400 4 in
Greater than 400 6 in

Let’s modify an existing rule. Open the iLogic Tree Editor, and double-click on Width_Rule to open it in the Rule Editor.

Modify the rule as follows:

If mass <= 100 Then
bracket_width = 1
ElseIf mass > 100 And mass <= 200 Then
bracket_width = 2
ElseIf mass > 200 And mass <= 300 Then
bracket_width = 3
ElseIf mass > 300 And mass <= 400 Then
bracket_width = 4
Else
bracket_width = 6
End If

Here, we are checking for a range of values in each of the If statements. Click OK to close the Rule Editor.

 

 

 

 

1234567891011121314151617181920

 






An Introduction to Autodesk Inventor iLogic – Part One – 17

Testing the iLogic Width Rule

 iLogic Parameter Editor Icon

To test this rule, open the iLogic Parameter Editor. First, set the value of the mass parameter to 100. The bracket width is set to 1 inch.

 

 

Creating a "Mass" parameter in the iLogic Parameter Editor

Change the mass parameter value to 200 and notice that the bracket width changes again…

 

 

 

 

Testing the new iLogic parameters.

Changing the mass to 300 causes the width of the bracket to increase to 3 inches. A mass of 400 results in a 4 inch wide bracket. Try it…

 

1234567891011121314151617181920

 






An Introduction to Autodesk Inventor iLogic – Part One – 16

Rule #3 – Bracket Dimensions – Continued

Clicking the dropdown menu in the Multivalue field in the mass row in the Parameter Editor reveals the list of values for the mass parameter.

 

Creating a Multi Value iLogic Parameter.

Click Done to complete the modification of the mass parameter. Now we’re ready to create a rule that will drive the bracket width.

Add the rule

Click the Add Rule icon on the iLogic ribbon panel. Name the rule “Width_Rule”. In the text window of the Rule Editor, start with an If statement. If the mass is 100, we want the bracket to be 1 inch wide. Locate the parameter called bracket_width by clicking on the Model Parameters node in the model tree. The list of model parameters will be displayed in the window at the top right of the Rule Editor.

 Double-click on bracket_width in the parameter list to insert the parameter name into the rule text. Parameter names can be directly typed into the rule, but double clicking from the list to insert them eliminates the possibility of spelling errors.

 

Using the double click method of iLogic parameter creation. 

 

 

 

 

Set the bracket with to 1 inch:

If mass = 100 Then
bracket_width = 1

It is possible to specify units in iLogic numeric expressions (e.g., “1 in”). However, we don’t demonstrate that in this tutorial for the sake of simplicity. When units are omitted, the units specified in the model’s document properties are assumed.

In the case where the mass = 200, the width should be 2 inches. Use an ElseIf statement to set the bracket_width to 2 inches when the mass is 200. The rule should look like this:

If mass = 100 Then
bracket_width = 1
ElseIf mass = 200 Then
bracket_width = 2

Now use two more ElseIf statements to cover the remaining value cases. End the rule with an End If statement. The complete rule, covering all possible values for mass, should look like this:

If mass = 100 Then
bracket_width = 1
ElseIf mass = 200 Then
bracket_width = 2
ElseIf mass = 300 Then
bracket_width = 3
ElseIf mass = 400 Then
bracket_width = 4
End If

Click OK on the Rule Editor dialog to save this new rule. Next, we’ll exercise it.

 

1234567891011121314151617181920

 






An Introduction to Autodesk Inventor iLogic – Part One – 15

Rule #3 – Bracket Dimensions

The third rule we will create will drive the dimensions of the bracket. Earlier we created a user parameter called mass. Our new rule will modify the width of the bracket based on the value of this parameter. In the first scenario, the width of the bracket will change according to the values shown in the following chart.

Mass Bracket Width
100 1 in
200 2 in
300 3 in
400 4 in

Add the set of possible values.

First, we will add the set of possible values for the mass parameter.

Right click in any empty cell in the mass row and choose the Make Multi-Value option from the context menu. The Value List Editor will open.

 

Adding iLogic parameters via the Value Editor List

 

 

 

 

if you haven’t already done so, you should use the Parameter Filter to display only the Key parameters in the list. This will make it easier to focus in on the mass parameter.

In the Add New Item(s) field, add the values 100, 200, 300 and 400. Click the Add button to populate the Value list, and then click the OK button to accept the list and return to the iLogic Parameter Editor.

 

 

 

 

 

 

 

 

1234567891011121314151617181920