Setting the Component Type
This next rule could have been created first, but we have left it until the end in order to show how rules can be re-ordered after they are created.
Create a new rule named “component_type_rule”, and open the rule editor.
This rule is very simple: for standard components, we want to make sure that all port sizes are the same. We do this by setting the sizes for ports B and C to be the same as Port A.
port_b_size = port_a_size
port_c_size = port_a_size
Click OK when you are done to save this rule.
Reordering the iLogic Rules
The order of rule execution sometimes affects the results of these rules. You can alter the order of execution from the iLogic Tree Editor.
You can also switch to the iLogic browser panel to view the tree of iLogic rules and parameters.
The iLogic Tree Editor dialog box will be displayed. Left-click on the component_type rule that we just created. Drag and drop this rule above the block_shape_rule.
Click OK when you are done. You might notice that the inventor Update icon is active. Click on it to update the model.
Activate the iLogic Parameter Editor dialog.
Notice the Driving Rule column value for port_b_size and port_c_size parameters. These column values indicate that there is a driving rule (component_type) in place for these two parameters. When component_type equals “standard”, these two port sizes are set automatically by the rule to be equal to port_a_size. Attempts to change these port values while component_type is equal to “standard” will fail, as the rule fires and controls these values. Notice that after changing component_type to “custom”, you are free to choose independent values for port_b_size and port_c_size.
Try it. Change component type from standard to custom. Now change port_b_size to 3 inch and port_c_size to be .75 inch. Notice that independent port sizes are possible. Change your component type back to standard. What happened to your model? All of the ports should have updated to match port_a_size.
iLogic Introduction Tutorial Links