Rule Text Reference

The following is a complete text reference of all the rules presented in this tutorial. These rules are also available in completed form in the manifold_block_complete.ipt file, which is included in the tutorials directory.

Block_Shape_Rule

Copy Code Block

If block = "tee" Then
Feature.IsActive("Port_B") = True
Feature.IsActive("Port_B_Threads") = True
ElseIf block = "elbow" Then
Feature.IsActive("Port_B") = False
Feature.IsActive("Port_B_Threads") = False
End If

Port_Size_Rule

Copy Code Block

i = GoExcel.FindRow("3rd
Party:Embedding 1", "Sheet1", "port_size", "=", port_a_size)
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")
Feature.ThreadDesignation("Port_A_Threads") = GoExcel.CurrentRowValue("tap_dim")

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 Party: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")

Block_Size_Rule

Copy Code Block

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

i = GoExcel.FindRow("3rd Party:Embedding 1", "Sheet1", "port_size", "=", port)
block_depth = GoExcel.CurrentRowValue("block_depth")
port_c_depth_from_front = GoExcel.CurrentRowValue("port_c_depth_from_front")
block_width = GoExcel.CurrentRowValue("block_width")
port_a_hor_offset = GoExcel.CurrentRowValue("hor_offset")
port_b_hor_offset = GoExcel.CurrentRowValue("hor_offset")
port_c_hor_offset = GoExcel.CurrentRowValue("hor_offset")

If block = "tee" Then
porta = MaxOfMany(port_a_size, port_b_size)
ElseIf block = "elbow"
porta = port_a_size
End If

i = GoExcel.FindRow("3rd Party:Embedding 1", "Sheet1", "port_size", "=", porta)
port_a_vert_offset = GoExcel.CurrentRowValue("vert_offset")
port_b_vert_offset = GoExcel.CurrentRowValue("vert_offset")

If block = "elbow" Then
port_c_vert_offset = GoExcel.CurrentRowValue("vert_offset") + (GoExcel.CurrentRowValue("port_dia")/4)
Else
port_c_vert_offset = GoExcel.CurrentRowValue("vert_offset")
End If
block_height = GoExcel.CurrentRowValue("block_height")

Component_Type_Rule

Copy Code Block

If component_type = "standard" Then
port_b_size = port_a_size
port_c_size = port_a_size
End If

Part_Number_Rule

Copy Code Block

If component_type = "standard" Then
i = GoExcel.FindRow("3rd Party:Embedding 1", "Sheet1", "port_size", "=", port_a_size)
iProperties.Value("Project", "Part Number") = GoExcel.CurrentRowValue("model_code")
Else
iProperties.Value("Project", "Part Number") = "HomeMade"
End If

Previous