;+
; NAME
;          EIS_RP_SET_ENV_VARS
;
; PURPOSE
;          This function checks the CMDPLN directory is valid
;
; CATEGORY
;          EIS Timeline Planning
;          Remote Planning
;
; INPUTS
;          tlbID - widget ID of top-level-base (eis_mk_plan)
;
; WRITTEN
;          John A Rainnie, RAL, 22-Aug-2008
;
; HISTORY
;          v0.1 JAR 22-Aug-2008
;
;
;-
;______________________________________________________________________________
PRO eis_rp_set_env_vars

; Set up planning environment
eis_plan_top = curdir()

; Reset environment variables
SETENV,'EIS_PLAN_TOP='   + eis_plan_top
; EIS_CPT_output
SETENV,'cpt_output_dir=' + CONCAT_DIR(eis_plan_top , 'EIS_CPT_output')



;
; CMDPLN
;
cmdpln_path = STRJOIN(['remote_planning','cp','cmdpln'],PATH_SEP(),/SINGLE)
SETENV,'CMDPLN=' + CONCAT_DIR(eis_plan_top , cmdpln_path)
;
; CMDPLN_EISCO
;
cmdpln_eisco = STRJOIN(['remote_planning','eisco','cmdpln'],PATH_SEP(),/SINGLE)
SETENV,'CMDPLN_EISCO=' + CONCAT_DIR(eis_plan_top , cmdpln_eisco)
;
; ZDBASE (the 'orrible)
;
SETENV,'ZDBASE_USER=+' + CONCAT_DIR(eis_plan_top , 'planning_db')
s = fix_zdbase(/user)
;
; EIS_CPT_input
;
cpt_input_path = STRJOIN([ eis_plan_top                              ,     $
                           'planning_db'                             ,     $
                           'EIS_CPT_input'] , PATH_SEP() , /SINGLE)
SETENV,'cpt_input_dir=' + cpt_input_path
;
; study_descriptions
;
st_desc_path   = STRJOIN([ eis_plan_top                              ,     $
                           'planning_db'                             ,     $
                           'study_descriptions'] , PATH_SEP() , /SINGLE)
SETENV,'study_descriptions=' + st_desc_path

;
; engineering_file_directory
;
eng_path       = STRJOIN([ eis_plan_top                              ,     $
                           'planning_db'                             ,     $
                           'EIS_CPT_input'                           ,     $
                           'engineering_tables']                     ,     $
                           PATH_SEP() , /SINGLE)
SETENV,'engineering_file_directory=' + eng_path




END