iLogic Tutorial From Autodesk – 07

Testing the New iLogic Rule (Port_Size_Rule)

Activate the iLogic Parameter Editor to see how our new iLogic rule will update the model when parameter values are changed. Change port_a_size to 1.50 by selecting from the multi-value list. When you click in another column (e.g., Driving Rule) or hit the Tab key, the parameter equation change will be made, and the port_size_rule will run. This will apply the changes to the parameters specified in the rule.

Setting new iLogic MultiValue iLogic rule

 

iLogic rule for the 3D Manifold Block ManifoldNotice how the model changes as you set this or other values. Using the value 1.50, your model should look something like the image to the right…

Clearly, we have some more work to do to get other aspects of the model (e.g., its size) to update according to the selected port size.

The Block_Size Rule

Now that we can change the size of each port, we will need to decide which face has the largest port so that the block can be sized appropriately. This will require another iLogic rule.

Add The iLogic rule

Add a new iLogic rule named “block_size”. Proceed to the rule editor.

First, we need to figure out which port is the largest. To do this, we examine the values of the three port size parameters, and hold onto the value of the largest one. As we did for the block_shape_rule, we will need to have different behavior for tee-style vs. elbow-style blocks.

For tee-style blocks, all three ports will be used, so we need to check the sizes for all of them. For elbow-style blocks, we are not interested in the size of Port B, since it will be suppressed. We use the MaxOfMany function to get the largest value out of a set of input values. We use the appropriate set of input values for each case. This function is available from the Math category on the Rule Syntax tab.

If block = “tee” Then
port = MaxOfMany(port_a_size,port_b_size,port_c_size)
ElseIf block = “elbow” Then
port = MaxOfMany(port_a_size,port_c_size)
End If

iLogic Introduction Tutorial Links

Intro12345678910

 

 

iLogic Intro Two

Subscribe to Blog via Email

Top