#!/bin/csh
# This is a program for the example Genesis Tooling Forms.
# This file will exist in form 2.
# The purpose of this program is to allow the user to output drill files.
# It is called by the "Output Drill Files" button.
# 
# Written by Ian Ticehurst (Autom8 Ltd.)
# Version 1A. Date: 12.09.00 - Initial design and development.
# Version 1B. Date: 11.12.00 - Add source of info. file to support gui creation.
# Version 1C. Date: 12.12.00 - Re-write the gui windows to use the sourced font and colours.
# Version 1D. Date: 05.02.01 - Modify to only check job path if job moved from original location.
#                            - Add save time update to forms.
# Version 1E. Date: 09.02.01 - Modify the setting and useage of $TMP.
# Version 1F. Date: 14.03.01 - Check how "$GENESIS_EDIR" is set to ensure paths are set correctly.
######################################################################### 

source $_genesis_root/sys/scripts/include_me

set_in_progress genform2 opd

# Close Form
COM close_form,job=$JOB,form=genform2

# Ask user to select standard output screen or ADM.
o_tooling
o FONT $NORM_FNT
o BG $NORM_COL
o BW 0
o LABEL Drill Output Method Popup
o LABEL Select drill output method.
o RADIO drl_out_mde Options: V 1 992222
o Auto Drill Manager
o Standard Output Page
o END

do_gui

if ($drl_out_mde == 1) then
   # Open ADM page.
   COM ncset_page_open
   COM ncset_cur,job=$JOB,step=panel,layer=,ncset=
else
   # Open output screen.
   COM output_show_page
endif

# Pause script and ask user to complete drill output.
PAUSE Press continue when drill output is complete

if ($drl_out_mde == 1) then
   COM ncset_page_close
endif

# Open Form
COM show_form,job=$JOB,form=genform2

set_complete genform2 opd

save_job

exit 0
