        SUBROUTINE GRAPHOUTPUT
!        USE WINTERACTER
        IMPLICIT NONE
        INTEGER LSET,JSET,OSET
        INCLUDE 'RESOURCE.INC'
        INCLUDE 'DATMAI.INC'
!        CALL WDIALOGGETRADIOBUTTON(IDF_GRA1,LSET)
!        CALL WDIALOGGETRADIOBUTTON(IDF_COL1,JSET)
!        CALL WDIALOGGETCHECKBOX(IDF_WMF,OSET)
        IF(LSET.EQ.1) THEN
        INPUT='DRAW'
        CALL PROCES
                END IF
        IF(LSET.EQ.3) THEN
        INPUT='DRAW'
        CALL PROCES
                END IF
C       PRINTER OUTPUT
        IF(LSET.EQ.3.OR.LSET.EQ.2) THEN
        IF(JSET.EQ.1) THEN
        INPUT='GRAOUT'
        CALL PROCES
                        END IF
        IF(JSET.EQ.2) THEN
        INPUT='GRAOUT COLOR'
        CALL PROCES
                        END IF
                        END IF
C       WMF
        IF(OSET.EQ.1) THEN
        IF(JSET.EQ.1) THEN
        INPUT='GRAOUT WMF'
        CALL PROCES
                        END IF
        IF(JSET.EQ.2) THEN
        INPUT='GRAOUT COLWMF'
        CALL PROCES
                        END IF
                        END IF
                        RETURN
                        END
        SUBROUTINE CHIEFTRACE
!        USE WINTERACTER
        IMPLICIT NONE
        INTEGER ISET,FWNUM
        CHARACTER AONUM*3,ARNUM*3,AINUM*3,BIGWORD*10
        REAL*8 XFOB,YFOB,ZFOB
        INCLUDE 'RESOURCE.INC'
        INCLUDE 'DATLEN.INC'
        INCLUDE 'DATMAI.INC'
C       FIELD SPEC. METHOD
!        CALL WDIALOGGETRADIOBUTTON(IDF_FIELD1,ISET)
C       GET FIELD VALUES
C       X
!        CALL WDIALOGGETDOUBLE(IDF_FXVALUE,XFOB)
C       Y
!        CALL WDIALOGGETDOUBLE(IDF_FYVALUE,YFOB)
C       Z
!        CALL WDIALOGGETDOUBLE(IDF_FZVALUE,ZFOB)
C       WAVELENGTH NUMBER
!        CALL WDIALOGGETINTEGER(IDF_FWAVE,FWNUM)
C
C       CONSTRUCT THE FOB COMMAND
        CALL ITOAA(NEWOBJ,AONUM)
        CALL ITOAA(NEWREF,ARNUM)
        CALL ITOAA(NEWIMG,AINUM)
        BIGWORD=' '//AONUM//ARNUM//AINUM
        IF(ISET.EQ.1) THEN
        WRITE(INPUT,*) 'FOB PIC ',YFOB,XFOB,ZFOB,DBLE(FWNUM),BIGWORD
        CALL PROCES
                        END IF
        IF(ISET.EQ.2) THEN
        WRITE(INPUT,*) 'FOBH PIC ',YFOB,XFOB,ZFOB,DBLE(FWNUM)
        CALL PROCES
                        END IF
        IF(ISET.EQ.3) THEN
        WRITE(INPUT,*) 'FOBA PIC ',YFOB,XFOB,DBLE(FWNUM)
        CALL PROCES
                        END IF
                        RETURN
                        END
        SUBROUTINE GRAYTRACE
!        USE WINTERACTER
        IMPLICIT NONE
        INTEGER RWNUM,ISTATE
!        CHARACTER BIGWORD*9
        REAL*8 RAYXR,RAYYR,INTENSITY
        INCLUDE 'RESOURCE.INC'
        INCLUDE 'DATLEN.INC'
        INCLUDE 'DATMAI.INC'
C
C       RADIO BUTTON STATUS
C       RAY AIM POINT SPEC. METHOD
!        CALL WDIALOGGETRADIOBUTTON(IDF_RAY1,JSET)
C       APERTURE CHECKING CHECK BOX
!        CALL WDIALOGGETCHECKBOX(IDF_APE,ISTATE)
C       GET RAY VALUES
C       RAY X POINT
!        CALL WDIALOGGETDOUBLE(IDF_RAYXVALUE,RAYXR)
C       RAY Y POINT
!        CALL WDIALOGGETDOUBLE(IDF_RAYYVALUE,RAYYR)
C       RAY WAVELENGTH NUMBER
!        CALL WDIALOGGETINTEGER(IDF_RAYWAVE,RWNUM)
C
C       CONSTRUCT THE RAY COMMAND
        INTENSITY=1.0D0
        IF(ISTATE.EQ.0)
     1  WRITE(INPUT,*) 'RAY ',RAYYR,RAYXR,RWNUM,INTENSITY
        IF(ISTATE.EQ.1)
     1  WRITE(INPUT,*) 'RAY CAOB ',RAYYR,RAYXR,RWNUM,INTENSITY
        CALL PROCES
                        RETURN
                        END
