(form "21409" (size 63 20)
    (heading "Export to Whittle Four-X")

    (label
        (position 2 4)
        (text "Block model type")
    )

    (field "use_IK"
        (position 17 4)
        (display_length 15)
        (max_length 40)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Y" "N" )
        (default "N")
        )

    (field "inc_mod_file"
        (position 20 17)
        (display_length 1)
        (max_length 5)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Y" "N")
        (default "Y")
        )

    (label
        (position 2 5)
        (text "Rock code attribute")
    )

    (field "att2"
        (position 17 5)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (auto_next off)
        )

    (label
        (position 2 6)
        (text "SG Attribute")
    )

    (field "att3"
        (position 17 6)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (auto_next off)
        )

    (field "att0_label"
        (position 2 7)
        (display_length 15)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
    )

    (field "att0"
        (position 17 7)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (auto_next off)
        )

    (field "att1_label"
        (position 2 8)
        (display_length 15)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
    )

    (field "att1"
        (position 17 8)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (auto_next off)
        )

    (field "vol_adj_label"
        (position 2 9)
        (display_length 15)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
        (default "Volume Adjustment")
    )

    (field "vol_adjust"
        (position 17 9)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null allowed)
        (auto_next off)
        )
  
  (label
        (position 32 5)
        (text "Waste rock code")
    )

    (field "waste_code"
        (position 49 5)
        (display_length 10)
        (max_length 40)
        (input allowed)
        (null disallowed)
        (auto_next off)
        )

    (label
        (position 32 6)
        (text "Air rock code")
    )

    (field "air_code"
        (position 49 6)
        (display_length 10)
        (max_length 40)
        (input allowed)
        (null disallowed)
        (auto_next off)
        )

    (label
        (position 32 7)
        (text "Model file name")
    )

    (field "model_name"
        (position 49 7)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (file (extension trim "*.mod"))
        )

    (label
        (position 32 8)
        (text "Parameter file name")
    )

    (field "parameter_name"
        (position 49 8)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (file (extension trim "*.par"))
        )

    (field "opt_label"
        (position 32 9)
        (display_length 10)
        (foreground (user_option "form_foreground"))
        (background (user_option "form_background"))
        (input disallowed)
    )

    (field "opt_att"
        (position 49 9)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (auto_next off)
        )
    (field "opt_att2"
        (position 49 9)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (auto_next off)
        )
    (field "opt_att3"
        (position 49 9)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (auto_next off)
        )


    (scroll_block "elements"
        (position 2 11)
        (size 40 3)
        (extra 0 1)
        (scroll_size 40 20)
        (repeat interactive
            (grow 0 1)
            (instances 1
                (min 1)
                (max 30)
            )
        )
        (top
          (field "scrl_1_label"
              (position 1 0)
              (display_length 15)
              (foreground (user_option "form_foreground"))
              (background (user_option "form_background"))
              (input disallowed)
          )
        )
        (main
          (field "grade_att"
              (position 1 0)
              (display_length 15)
              (max_length 512)
              (input allowed)
              (null allowed)
              (auto_next off)
              )
        )
    )
    
    (field "create_report"
          (position 20 17)
          (display_length 1)  
          (max_length 5)
          (translate upper)
          (input allowed)
          (null disallowed)
          (auto_next off)
          (value_in "Y" "N")
          (default "Y")
        )
        
    (field "report_format" (position 54 15) (display_length 16)
    (input allowed) (null allowed)
    (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"))

    (field "exp_report_fname"
        (position 49 6)
        (display_length 10)
        (max_length 40)
        (input allowed)
        (null allowed)
        (auto_next off)
        )
        
    (field "exp_report_format" (position 54 15) (display_length 16)
    (input allowed) (null allowed)
    (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"))
    (label        
        (position 2 15)
        (text "File format")
    )

    (field "file_form"
        (position 20 15)
        (display_length 3)
        (max_length 5)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Fixed" "Free" )
        (default "Free")
        )

    (label        
        (position 2 16)
        (text "Export Block Size")
    )

    (field "resolution"
        (position 20 16)
        (display_length 3)
        (max_length 5)
        (translate upper)
        (input allowed)
        (null disallowed)
        (auto_next off)
    )

    (label
        (position 30 15)
        (text "Block Size")
    )

    (label             
        (position 30 16)
        (text "X")
    )
    (label
        (position 40 16)
        (text "Y")
    )
    (label
        (position 50 16)
        (text "Z")
    )
    (label        
        (position 2 17)
        (text "Constrain Model")
    )

    (field "constrain"
        (position 20 17)
        (display_length 1)
        (max_length 5)
        (translate upper)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Y" "N")
        (default "N")
        )
     (field "inc_pil_file"
        (position 20 17)
        (display_length 1)
        (max_length 5)
        (translate upper)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Y" "N")
        (default "N")
        )
    (field "pil_att"
        (position 49 9)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (auto_next off)
        (null allowed)
        )
    (field "report_name"
        (position 49 8)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null allowed)
        (auto_next off)
        (file (extension trim "*.pil"))
        )        
    (field "validate"
        (position 20 17)
        (display_length 1)
        (max_length 5)
        (translate upper)
        (input allowed)
        (null disallowed)
        (auto_next off)
        (value_in "Y" "N")
        (default "N")
        )
    (field "error_att"
        (position 49 9)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (auto_next off)
        (null disallowed)
        (dependency (value "validate") == "Y")
        )

    (field "pil_file_name"
        (position 49 8)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (input allowed)
        (null allowed)
        (auto_next off)
        (file (extension trim "*.pil"))
        )
        
    (field "decimals"
        (position 49 8)
        (display_length 10)
        (max_length 40)
        (translate lower)
        (auto_next off)
        (value_in "0" "1" "2" "3")
         )
    (default_buttons)
)
