如何添加您的知识

规则文本参考

    内容表格
    No headers

    以下是本教程中展示的所有规则的完整文本参考。包含在 tutorials 目录下的 manifold_block_complete.ipt 文件中也提供了完整格式的上述规则。

    Block_Shape_Rule

    复制代码块

    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

    复制代码块

    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

    复制代码块

    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

    复制代码块

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

    Part_Number_Rule

    复制代码块

    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

    上一页