(form "20330" (size 70 21)
    (heading "BLOCK MODEL REDUCTION & DILUTION")

    (label 
        (position 2 2)
        (text "Digging Zones")
    )
    (field "dz_type"
        (position 14 2)
        (display_length 13)
        (max_length 15)
        (input allowed)
        (value_in "None" "Truck & Shovel" "Dragline")
        (default "None")
        )

    (label 
        (position 36 2) 
        (text "Use Volume Factor?")
    )
    (field "use_vol"
        (position 55 2)
        (display_length 2)
        (max_length 4)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Yes" "No")
        (default "No")
        )

    (field "dz_depth_label" 
        (position 2 3)
        (display_length 22)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "Depth to lower zone")
        (default "Depth to lower zone")
        (dependency (value "dz_type") == "Dragline")
    )
    (field "dz_depth"
        (position 19 3)
        (display_length 6)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (auto_next off)
        (default "0")
        (dependency (value "dz_type") == "Dragline")
        )

    (field "vol_att_label" 
        (position 36 3)
        (display_length 15)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (value_in "Attribute")
        (default "Attribute")
        (dependency (value "use_vol") == "Yes")
    )
    (field "vol_att"
        (position 43 3)
        (display_length 12)
        (max_length "BM_MAX_ATT_NAME_LEN")
        (input allowed)
        (null disallowed)
        (auto_next off)
        (dependency (value "use_vol") == "Yes")
        )

    (label
        (position 2 5)
        (Text "Thicknesses")
    )

    (label
        (position 20 5)
        (text "Top")
    )

    (label 
        (position 14 6) 
        (text "Dilution")
    )
    (label 
        (position 23 6) 
        (text "Reduction")
    )

    (label
        (position 40 5)
        (text "Bottom")
    )

    (label 
        (position 35 6) 
        (text "Dilution")
    )
    (label 
        (position 44 6) 
        (text "Reduction")
    )

    (field "col_label"
        (position 4 7) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Column")
    )
    (field "ore_label0"
        (position 4 8) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Ore Layer")
    )
    (field "ore_label1"
        (position 4 9) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Ore Layer")
        (dependency (value "dz_type") != "None")
    )
    (field "ore_label2"
        (position 4 10) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Ore Layer")
        (dependency (value "dz_type") != "None")
    )
    (field "top_dil"
        (position 14 7)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_red"
        (position 23 7)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_dil"
        (position 35 7)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_red"
        (position 44 7)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_dil_thk0"
        (position 14 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_red_thk0"
        (position 23 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "top_dil_thk1"
        (position 14 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_dil_thk0")
        )
    )
    (field "top_red_thk1"
        (position 23 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_red_thk0")
        )
    )
    (field "top_dil_thk2"
        (position 14 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_dil_thk0")
        )
    )
    (field "top_red_thk2"
        (position 23 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "top_red_thk0")
        )
    )
    (field "bottom_dil_thk0"
        (position 35 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_red_thk0"
        (position 44 8)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )
    (field "bottom_dil_thk1"
        (position 35 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_dil_thk0")
        )
    )
    (field "bottom_red_thk1"
        (position 44 9)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_red_thk0")
        )
    )
    (field "bottom_dil_thk2"
        (position 35 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_dil_thk0")
        )
    )
    (field "bottom_red_thk2"
        (position 44 10)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        (dependency (value "dz_type") != "None")
        (help
            (field "bottom_red_thk0")
        )
    )

    (field "upper_zone"
        (position 52 8) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "upper zone")
        (dependency (value "dz_type") != "None")
    )
    (field "middle_zone"
        (position 52 9) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "middle zone")
        (dependency (value "dz_type") != "None")
    )
    (field "lower_zone"
        (position 52 10) 
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "lower zone")
        (dependency (value "dz_type") != "None")
    )
    (label 
        (position 2 11) 
        (text "Attributes to composite")
    )
    (label 
        (position 2 12) 
        (text "(list master first)")
    )
    (scroll_block "attributes"
        (position 2 14)
        (size 30 2)
        (extra 0 1)
        (scroll_size 30 50)
        (repeat interactive
            (grow 0 1)
            (instances 0
                (min 1)
                (max 50)
            )
        )
        (top
            (label
                (position 1 0)
                (text "Attribute")
            )
            (label
                (position 16 0)
                (text "Diluted Grade")
            )
        )
        (main
            (field "quality"
                (position 1 0)
                (display_length 12)
                (max_length "BM_MAX_ATT_NAME_LEN")
                (input allowed)
                (null disallowed)
                )
            (field "comp_att"
                (position 16 0)
                (display_length 12)
                (max_length "BM_MAX_ATT_NAME_LEN")
                (input allowed)
                (null disallowed)
                (auto_next off)
                )
        )
    )
    (label 
        (position 42 12) 
        (text "Cutoff")
    )
    (field "cutoff"
        (position 51 12)
        (display_length 4)
        (input allowed)
        (null disallowed)
        (low_bound 0)
        (format real_8)
        )

    (label
        (position 39 14)
        (text "Ore attribute")
    )
    (field "ore_att"
        (position 51 14)
        (display_length 13)
        (max_length "BM_MAX_ATT_NAME_LEN")
        (input allowed)
        (null disallowed)
        )
    
    (label
        (position 39 15)
        (text "Ore Value")
    )
    (field "ore_val"
        (position 51 15)
        (display_length 13)
        (max_length 30)
        (input allowed)
        )

    (label
        (position 39 16)
        (text "Waste Value")
    )
    (field "waste_val"
        (position 51 16)
        (display_length 13)
        (max_length 30)
        (input allowed)
        )

    (label
        (position 2 17)
        (text "Direction of columns")
    )
    (field "axis"
        (position 22 17)
        (display_length 2)
        (input allowed)
        (null disallowed)
        (value_in "X" "Y" "Z" "-X" "-Y" "-Z")
        (default "-Z")
        )
    
    (label
        (position 2 18)
        (text "Constrain discrimination?")
    )
    (field "constrain"
        (position 22 18)
        (display_length 2)
        (max_length 4)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "Yes")
        )

    (label
        (position 30 18)
        (text "Change WASTE above cutoff to ORE?")
    )
    (field "chg_to_ore"
        (position 64 18)
        (display_length 2)
        (max_length 4)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "Yes")
        )

    (label
        (position 30 19)
        (text "Change ORE below cutoff to WASTE?")
    )
    (field "chg_to_waste"
        (position 64 19)
        (display_length 2)
        (max_length 3)
        (input allowed)
        (null disallowed)
        (value_in "Yes" "No")
        (default "Yes")
        )

    (label
        (position 2 19)
        (text "REPORT_FILE_NAME")
    )
    (field "fname"
        (position 14 19)
        (display_length 12)
        (max_length "FIO_MAX_FILENAME_LENGTH")
        (translate lower)
        (input allowed)
        (null disallowed)
        (file output
            (extension trim "reports|*.not")
        )
        (help   "REPORT_FILE_NAME_TIP"
        ))
    (field "report_format" (position 14 20) (display_length 16)
      (input allowed) (null disallowed)
      (value_in ".not - Surpac Note File"
                ".csv - Comma Separated (Spreadsheet)"
                ".htm - Hypertext Markup Language (Web)"
                ".html - Hypertext Markup Language (Web)"
                ".rtf - Rich Text Format (Microsoft Word)"
                ".pdf - Adobe Acrobat"
                ".ps - Postscript"
                ".log - Surpac log file"))

    (default_buttons)
)
