#!/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 prompt the user to run any DFM functions required.
# It is called by the "Run DFM Functions" 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.
#                            - Text change to remove abbreviations.
#                            - 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 dfm

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

# Open editor on step "pcb".
COM open_entity,job=$JOB,type=step,name=pcb
set group=$COMANS
AUX set_group,group=$group

# Put window on screen asking user to run dfm functions or checklist.
o_tooling
o FONT $NORM_FNT
o BG $NORM_COL
o BW 0
o LABEL Automatic Edit Pop-up.
o LABEL Editor has been opened.
o LABEL Program will pause.
o LABEL Create and run DFM checklist.
o LABEL Close pause box when DFM editing complete.
o FONT $HINT_FNT
o BG $HINT_COL
o LABEL Hint - Make sure DFM functions are used in the correct order
o LABEL "(For example - do outer circuit fixing before soldermask"
o LABEL "and do soldermask fix before silk screen clipping)"
o BG $NORM_COL
o END

do_gui

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

# Close editor.
COM editor_page_close

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

set_complete genform2 dfm

save_job

exit 0
