iLogic Tutorial From Autodesk – 06

Managing iLogic Part Configurations – Part 2

Now, we want to set a series of parameters based on the values of cells from this row in the spreadsheet. These parameters will control the port diameter, drill depth, and the distance between the bolt holes. Use the function labeled “= GoExcel.CurrentRowValue(“columnName”)”.

port_a_y_dist_between_screw = GoExcel.CurrentRowValue(“y_dist_between_screw”) port_a_x_dist_between_screw = GoExcel.CurrentRowValue(“x_dist_between_screw”)
port_a_port_dia = GoExcel.CurrentRowValue(“port_dia”)
Port_A_Drill_Depth = GoExcel.CurrentRowValue(“tap_drill_depth”)

Remember that you can use the items in the Model tab of the rule editor to access various sets of parameters in the model. The ones used above are all Model parameters.

We have one more line of code to add for this part of the rule. This line of code will define the thread of the tapped holes. Under Categories, click on Component/Feature. Near the bottom of the list of functions, choose Feature.ThreadDesignation(“featurename”)= “3/8-16 UNC”. We will replace the feature name with “Port_A_Threads”, and will use another value from the spreadsheet row for its value.

Feature.ThreadDesignation(“Port_A_Threads”) = GoExcel.CurrentRowValue(“tap_dim”)

Here, we have indicated that we should use the tap_dim cell to get the thread designation for the bolt holes.

Now you’ve completed the instructions to set the parameters related to Port A. Since we have three ports, we will now copy the rule text that we have created thus far and paste it two more times. For the second grouping of code, change port_a text to be port_b. For the third grouping, change port_a to be port_c.

The additional rule lines should look like this:

i = GoExcel.FindRow(“3rd Party:Embedding 1”, “Sheet1”, “port_size”, “=”, port_b_size) port_b_y_dist_between_screw = GoExcel.CurrentRowValue(“y_dist_between_screw”) port_b_x_dist_between_screw = GoExcel.CurrentRowValue(“x_dist_between_screw”)
port_b_port_dia = GoExcel.CurrentRowValue(“port_dia”)
Port_B_Drill_Depth = GoExcel.CurrentRowValue(“tap_drill_depth”)
Feature.ThreadDesignation(“Port_B_Threads”) = GoExcel.CurrentRowValue(“tap_dim”)

i = GoExcel.FindRow(“3rd arty:Embedding 1”, “Sheet1”, “port_size”, “=”, port_c_size) port_c_y_dist_between_screw = GoExcel.CurrentRowValue(“y_dist_between_screw”) port_c_x_dist_between_screw = GoExcel.CurrentRowValue(“x_dist_between_screw”)
port_c_port_dia = GoExcel.CurrentRowValue(“port_dia”)
Port_C_Drill_Depth = GoExcel.CurrentRowValue(“tap_drill_depth”)
Feature.ThreadDesignation(“Port_C_Threads”) = GoExcel.CurrentRowValue(“tap_dim”)

That’s all we need to set up the port geometry. Click OK in the iLogic rule editor to save your port_size_rule. Your model may or may not update at this point depending upon how the iLogic port size parameters were initially set.

 

iLogic Introduction Tutorial Links

Intro12345678910

 

 

iLogic Intro Two

Subscribe to Blog via Email