      SUBROUTINE ECOPT(ISORTIE)
      INCLUDE 'com_coor.f'
      INCLUDE 'com_faces.f'
      INCLUDE 'com_options.f'
      CHARACTER*32  CBID2
      CHARACTER*512 CBID
C
      LL = 0
      IF (ILANG.NE.ILANG0) THEN
        IF (ILANG.EQ.0) THEN
          CBID(LL+1:LL+8) = '-french '
          LL = LL+8
        ELSE
          CBID(LL+1:LL+9) = '-english '
          LL = LL+9
        ENDIF
      ENDIF
      IF (IAXES.NE.IAXESDEF) THEN
        WRITE(CBID2(1:2),'(I1," ")') IAXES
        CBID(LL+1:LL+8) = '-axis='//CBID2(1:2)
        LL = LL+8
      ENDIF
      IF (ICTFON.NE.0) THEN
        IF (ICTFON.LE.9) THEN
          WRITE(CBID2(1:2),'(I1," ")') ICTFON
          L = 2
        ELSE
          WRITE(CBID2(1:3),'(I2," ")') ICTFON
          L = 3
        ENDIF
        CBID(LL+1:LL+4+L) = '-bg='//CBID2(1:L)
        LL = LL+4+L
      ENDIF
      IF (IMAILL.LT.0) THEN
        WRITE(CBID2(1:1),'(I1)') 3-IMAILL
        CBID(LL+1:LL+8) = '-bord='//CBID2(1:1)//' '
        LL = LL+8
      ELSEIF(IBORD.EQ.-1) THEN
        IF (IEPBOR2.EQ.2) THEN
          CBID(LL+1:LL+8) = '-bord=2 '
          LL = LL+8
        ELSE
          CBID(LL+1:LL+8) = '-bord=3 '
          LL = LL+8
        ENDIF
      ELSEIF(IBORD.EQ.1) THEN
        IF (ICOURB.NE.1.OR.I2D.NE.0) THEN
          CBID(LL+1:LL+8) = '-bord=0 '
          LL = LL+8
        ENDIF
      ELSE
        IF (ICOURB.EQ.1.AND.I2D.EQ.0) THEN
          CBID(LL+1:LL+8) = '-bord=1 '
          LL = LL+8
        ENDIF
      ENDIF
      IF ((IBOITE.NE.0.AND.ICOURB.GT.0)
     &.OR.((IBOITE.NE.1.OR.IECBOI.GT.0).AND.ICOURB.LT.0)) THEN
        IF (IBOITE.EQ.0) THEN
          CBID(LL+1:LL+7) = '-box=0 '
          LL = LL+7
        ELSE
          WRITE(CBID2(1:3),'(I2," ")') IBOITE*10+IECBOI
          CBID(LL+1:LL+8) = '-box='//CBID2(1:3)
          LL = LL+8
        ENDIF
      ENDIF
      IF (ICOLAR.NE.2) THEN
        IF (ICOLAR.LT.10) THEN
          WRITE(CBID(LL+1:LL+10),'("-colseg=",I1," ")') ICOLAR
          LL = LL+10
        ELSE
          WRITE(CBID(LL+1:LL+11),'("-colseg=",I2," ")') ICOLAR
          LL = LL+11
        ENDIF
      ENDIF
      IF (IFC.GT.0.AND.I2D.NE.0) THEN
        CBID(LL+1:LL+8) = '-hidden '
        LL = LL+8
      ELSEIF (IFC.LT.0.AND.I2D.EQ.0) THEN
        CBID(LL+1:LL+10) = '-nohidden '
        LL = LL+10
      ENDIF
      IF (NRECON.GT.1) THEN
        IF (NRECON.LT.10) THEN
          WRITE(CBID(LL+1:LL+7),'("-sym=",I1," ")') NRECON
          LL = LL+7
        ELSE
          WRITE(CBID(LL+1:LL+8),'("-sym=",I2," ")') NRECON
          LL = LL+8
        ENDIF
      ENDIF
      IF (XINIT_ECH(1,1).NE.BIGS) THEN
        CALL REDUITREEL1(XINIT_ECH(1,1),CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        CBID(LL+1:LL+L+8) = '-echx0='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (XINIT_ECH(2,1).NE.BIGS) THEN
        CALL REDUITREEL1(XINIT_ECH(2,1),CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        CBID(LL+1:LL+L+8) = '-echx1='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (XINIT_ECH(1,2).NE.BIGS) THEN
        CALL REDUITREEL1(XINIT_ECH(1,2),CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        CBID(LL+1:LL+L+8) = '-echy0='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (XINIT_ECH(2,2).NE.BIGS) THEN
        CALL REDUITREEL1(XINIT_ECH(2,2),CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        CBID(LL+1:LL+L+8) = '-echy1='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (XINIT_ECH(1,3).NE.BIGS) THEN
        CALL REDUITREEL1(XINIT_ECH(1,3),CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        CBID(LL+1:LL+L+8) = '-echz0='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (XINIT_ECH(2,3).NE.BIGS) THEN
        CALL REDUITREEL1(XINIT_ECH(2,3),CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        CBID(LL+1:LL+L+8) = '-echz1='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (ITOUCHEX.NE.0.OR.(FACEXA.NE.0..AND.FACEXA.NE.1.)) THEN
        IF (FACEXA.EQ.0.) THEN
          CBID2 = '0'
          L = 1
        ELSEIF(FACEXA.EQ.1.) THEN
          CBID2 = '1'
          L = 1
        ELSE
          CALL REDUITREEL1(FACEXA,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
        ENDIF
        CBID(LL+1:LL+L+7) = '-exag='//CBID2(1:L)//' '
        LL = LL+L+7
      ELSEIF(ICOURB.LE.0.AND.
     &       (FACEXAX.NE.1..OR.FACEXAY.NE.1..OR.FACEXAZ.NE.1.) ) THEN
        IF (FACEXAX.EQ.EXAX0.AND.FACEXAY.EQ.EXAY0
     & .AND.FACEXAZ.EQ.EXAZ0) THEN
          CBID(LL+1:LL+6) = '-cube '
          LL = LL+6
        ELSE
          CALL REDUITREEL1(FACEXAX,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          IF (L.GT.1.OR.CBID2(1:1).NE.'1') THEN
            CBID(LL+1:LL+L+8) = '-exagx='//CBID2(1:L)//' '
            LL = LL+L+8
          ENDIF
          CALL REDUITREEL1(FACEXAY,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          IF (L.GT.1.OR.CBID2(1:1).NE.'1') THEN
            CBID(LL+1:LL+L+8) = '-exagy='//CBID2(1:L)//' '
            LL = LL+L+8
          ENDIF
          CALL REDUITREEL1(FACEXAZ,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          IF (L.GT.1.OR.CBID2(1:1).NE.'1') THEN
            CBID(LL+1:LL+L+8) = '-exagz='//CBID2(1:L)//' '
            LL = LL+L+8
          ENDIF
        ENDIF
      ENDIF
      IF (LONVIT.GT.0) THEN
        CALL REMETFULLPATH(NOM_VIT,LONVIT)
        LL1 = MAX(1,LONVIT-4)
        LL2 = MAX(1,LONG-7)
        IF (NOM_VIT(LL1:LONVIT).NE.'.depl'
     &  .OR.NOM_VIT(1:LL1).NE.NOM_FICH(1:LL2)) THEN
          IF (NOM_VIT(1:LONVIT).NE.NOM_FICH(1:LONG)) THEN
            CBID(LL+1:LL+LONVIT+7) = '-fich='//NOM_VIT(1:LONVIT)//' '
            LL = LL+LONVIT+7
          ENDIF
        ENDIF
        IF (NOM_VIT(LL1:LONVIT).NE.'.depl') THEN
          CBID(LL+1:LL+8) = '-nodepl '
          LL = LL+8
        ENDIF
      ELSEIF(NODEPL.NE.0) THEN
        CBID(LL+1:LL+8) = '-nodepl '
        LL = LL+8
      ENDIF
      IF (LONISO.GT.0) THEN
        IF (NOM_ISO(1:1).NE.'$') THEN
          CALL REMETFULLPATH(NOM_ISO,LONISO)
          CBID(LL+1:LL+LONISO+7) = '-fich='//NOM_ISO(1:LONISO)//' '
          LL = LL+LONISO+7
        ENDIF
      ENDIF
      IF (IVIT.LT.0) THEN
        IF (FACVIT0.EQ.1.) THEN
          CBID(LL+1:LL+8) = '-fleche '
          LL = LL+8
        ELSE
          CALL REDUITREEL1(FACVIT0,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          CBID(LL+1:LL+L+9) = '-fleche='//CBID2(1:L)//' '
          LL = LL+L+9
        ENDIF
      ENDIF
      IF (IFRONT.NE.0) THEN
        IF (IFRONT.EQ.-1) THEN
          III = 4
        ELSE
          III = IFRONT
        ENDIF
        WRITE(CBID2,'(I1)') III
        CBID(LL+1:LL+9) = '-front='//CBID2(1:1)//' '
        LL = LL+9
      ENDIF
      IF (ISO.NE.0
     &.AND.ISOBID.GT.0.AND.ISOBID.LE.3.AND.NOM_ISO(1:1).EQ.'$') THEN
        ISOBIDOK = 1
        IF (ISOBID.EQ.1.AND.NOM_ISO(LONISO-1:LONISO).EQ.'.z') THEN
          CBID(LL+1:LL+7) = '-iso=z '
        ELSEIF(ISOBID.EQ.2.AND.NOM_ISO(LONISO-1:LONISO).EQ.'.x') THEN
          CBID(LL+1:LL+7) = '-iso=x '
        ELSEIF(ISOBID.EQ.3.AND.NOM_ISO(LONISO-1:LONISO).EQ.'.y') THEN
          CBID(LL+1:LL+7) = '-iso=y '
        ELSE
          ISOBIDOK = 0
        ENDIF
        IF (ISOBIDOK.EQ.1) LL = LL+7
      ELSE
        ISOBIDOK = 0
      ENDIF
      IF (ISO.NE.0.AND.
     &     (NOM_ISO(1:1).NE.'$'.OR.LONVIT.GT.0.OR.ISOBIDOK.NE.0)) THEN
        LLLL = 2
        IF (ISO.EQ.3) THEN
          CBID2 = '11 '
          LLLL = 3
        ELSEIF(ISO.EQ.2) THEN
          IF (ICENTRISO.EQ.0) THEN
            IF (IVALMAR.EQ.0) THEN
              CBID2 = '4 '
            ELSE
              CBID2 = '5 '
            ENDIF
          ELSE
            IF (IVALMAR.EQ.0) THEN
              CBID2 = '9 '
            ELSE
              CBID2 = '10 '
              LLLL = 3
            ENDIF
          ENDIF
        ELSE
          IF (ISOFRO.EQ.0) THEN
            CBID2 = '1 '
          ELSE
            IF (ICENTRISO.EQ.0) THEN
              IF (IVALMAR.EQ.0) THEN
                CBID2 = '2 '
              ELSE
                CBID2 = '3 '
              ENDIF
            ELSE
              IF (IVALMAR.EQ.0) THEN
                CBID2 = '7 '
              ELSE
                CBID2 = '8 '
              ENDIF
            ENDIF
          ENDIF
        ENDIF
        CBID(LL+1:LL+5+LLLL) = '-iso='//CBID2(1:LLLL)
        LL = LL+5+LLLL
      ENDIF
      IF (NSURF.GT.0) THEN
        CALL REDUITREEL1(VISO,CBID2,L,0)
        IF (CBID2(L:L).EQ.'.') L = L-1
        IF (ICALSU.EQ.0) THEN
          CBID(LL+1:LL+L+10) = '-isosurf='//CBID2(1:L)//' '
          LL = LL+L+10
        ELSEIF(ICALSU.EQ.1) THEN
          CBID(LL+1:LL+L+11) = '-isosurf-='//CBID2(1:L)//' '
          LL = LL+L+11
        ELSE
          CBID(LL+1:LL+L+11) = '-isosurf+='//CBID2(1:L)//' '
          LL = LL+L+11
        ENDIF
      ENDIF
      IF (ILEG.GT.0.AND.ILEGMAN.GT.0.AND.LONLEG.GT.0) THEN
        WRITE(CBID2,'(I1)') ILEG
        CBID(LL+1:LL+LONLEG+18) = '-legpos='//CBID2(1:1)
     &                   //' -leg="'//LEG(1:LONLEG)//'" '
        LL = LL+LONLEG+18
      ELSEIF(ILEG.LE.0.AND.ILEGAUTO.GT.0) THEN
        CBID(LL+1:LL+7) = '-noleg '
        LL = LL+7
      ENDIF
      IF (ICTFAC.NE.ICTFAC00.OR.IDIRL.NE.IDIRL0) THEN
        IF (ICTFAC.GT.95.AND.ICTFAC00.GT.95.AND.IDIRL.NE.IDIRL0) THEN
          WRITE(CBID2,'(I1)') IDIRL
          CBID(LL+1:LL+9) = '-light='//CBID2(1:1)//' '
          LL = LL+9
        ELSEIF(ICTFAC.LT.96.AND.ICTFAC00.GT.95) THEN
          CBID(LL+1:LL+10) = '-light=-1 '
          LL = LL+10
        ENDIF
      ENDIF
      IF (ILOGX*ILOGY*ILOGZ.NE.0) THEN
        CBID(LL+1:LL+5) = '-log '
        LL = LL+5
      ELSE
        IF (ILOGX.NE.0) THEN
          CBID(LL+1:LL+6) = '-logx '
          LL = LL+6
        ENDIF
        IF (ILOGY.NE.0) THEN
          CBID(LL+1:LL+6) = '-logy '
          LL = LL+6
        ENDIF
        IF (ILOGZ.NE.0) THEN
          CBID(LL+1:LL+6) = '-logz '
          LL = LL+6
        ENDIF
      ENDIF
      IF (ITOUCHNB.NE.0) THEN
        WRITE(CBID2,'(I3)') NBCOL
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,3)
        CBID(LL+1:LL+L+8) = '-nbcol='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (IPERSP.NE.IPERSP0) THEN
        IF (IPERSP.EQ.1) THEN
          IBID = 0
        ELSE
          IBID = -IPERSP
        ENDIF
        WRITE(CBID2,'(I1)') IBID
        CBID(LL+1:LL+9) = '-persp='//CBID2(1:1)//' '
        LL = LL+9
      ENDIF
      IF (ITOUCHTAB.NE.0) THEN
        WRITE(CBID2,'(I2)') ITABLE
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,2)
        CBID(LL+1:LL+L+8) = '-table='//CBID2(1:L)//' '
        LL = LL+L+8
      ENDIF
      IF (ISO.NE.0) THEN
        IF (VMIN0.NE.VMIN) THEN
          CALL REDUITREEL1(VMIN,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          CBID(LL+1:LL+L+7) = '-vmin='//CBID2(1:L)//' '
          LL = LL+L+7
        ENDIF
        IF (VMAX0.NE.VMAX) THEN
          CALL REDUITREEL1(VMAX,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          CBID(LL+1:LL+L+7) = '-vmax='//CBID2(1:L)//' '
          LL = LL+L+7
        ENDIF
      ENDIF
C
C Courbes sur c3d
C
      IF (LONCOUR.GT.0.AND.ICOURB.LT.0.AND.NPSUR.GT.0) THEN
        IF (ICSEG.NE.7) THEN
          WRITE(CBID2,'(I2)') ICSEG
          CALL ENLEVE_TOUS_BLANCS(CBID2,L,2)
          CBID(LL+1:LL+L+15) = '-courlignecol='//CBID2(1:L)//' '
          LL = LL+L+15
        ENDIF
        IF (ICPTS.NE.1) THEN
          WRITE(CBID2,'(I2)') ICPTS
          CALL ENLEVE_TOUS_BLANCS(CBID2,L,2)
          CBID(LL+1:LL+L+12) = '-courptcol='//CBID2(1:L)//' '
          LL = LL+L+12
        ENDIF
        IF (FACPTS.NE.1.) THEN
          CALL REDUITREEL1(FACPTS,CBID2,L,0)
          IF (CBID2(L:L).EQ.'.') L = L-1
          CBID(LL+1:LL+L+13) = '-courptsize='//CBID2(1:L)//' '
          LL = LL+L+13
        ENDIF
        IF (IEPSEG.NE.1) THEN
          WRITE(CBID2,'(I2)') IEPSEG
          CALL ENLEVE_TOUS_BLANCS(CBID2,L,2)
          CBID(LL+1:LL+L+17) = '-courepaisligne='//CBID2(1:L)//' '
          LL = LL+L+17
        ENDIF
        IF (ITPTS.NE.5) THEN
          WRITE(CBID2,'(I2)') ITPTS
          CALL ENLEVE_TOUS_BLANCS(CBID2,L,2)
          CBID(LL+1:LL+L+13) = '-courpttype='//CBID2(1:L)//' '
          LL = LL+L+13
        ENDIF
        IF (IOPMAR.NE.0) THEN
          WRITE(CBID2,'(I2)') IOPMAR
          CALL ENLEVE_TOUS_BLANCS(CBID2,L,2)
          CBID(LL+1:LL+L+11) = '-courptvu='//CBID2(1:L)//' '
          LL = LL+L+11
        ENDIF
        CBID(LL+1:LL+LONCOUR+11) = '-courfich='
     &                           //NOM_COUR(1:LONCOUR)//' '
        LL = LL+LONCOUR+11
      ENDIF
      CALL ARC(ANGX,ANGY,ANGZ)
      PETIT = .005
      IF (I2D.EQ.0) THEN
        ANGX0 = 0.
        ANGY0 = 0.
        ANGZ0 = 0.
      ELSE
        ANGX0 = -45.
        ANGY0 = 35.26439
        ANGZ0 = 150.
      ENDIF
      IF (ABS(ANGX-ANGX0).GT.PETIT) THEN
        WRITE(CBID2,'(F7.2)') ANGX
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,7)
        IF (CBID2(L:L).EQ.'0') THEN
          L = L-1
          IF (CBID2(L:L).EQ.'0') THEN
            L = L-2
          ENDIF
        ENDIF
        CBID(LL+1:LL+L+7) = '-rotx='//CBID2(1:L)//' '
        LL = LL+L+7
      ENDIF
      IF (ABS(ANGY-ANGY0).GT.PETIT) THEN
        WRITE(CBID2,'(F7.2)') ANGY
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,7)
        IF (CBID2(L:L).EQ.'0') THEN
          L = L-1
          IF (CBID2(L:L).EQ.'0') THEN
            L = L-2
          ENDIF
        ENDIF
        CBID(LL+1:LL+L+7) = '-roty='//CBID2(1:L)//' '
        LL = LL+L+7
      ENDIF
      IF (ABS(ANGZ-ANGZ0).GT.PETIT) THEN
        WRITE(CBID2,'(F7.2)') ANGZ
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,7)
        IF (CBID2(L:L).EQ.'0') THEN
          L = L-1
          IF (CBID2(L:L).EQ.'0') THEN
            L = L-2
          ENDIF
        ENDIF
        CBID(LL+1:LL+L+7) = '-rotz='//CBID2(1:L)//' '
        LL = LL+L+7
      ENDIF
      ZOOM = XLAREF/XLARG
      PETIT = 1.E-3
      IF (ABS(ZOOM-1.).GT.PETIT) THEN
        WRITE(CBID2,'(F8.3)') ZOOM
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,8)
        CBID(LL+1:LL+L+7) = '-zoom='//CBID2(1:L)//' '
        LL = LL+L+7
      ENDIF
      IF (ABS((XCUR-XCUREF)/XLARG).GT.PETIT) THEN
        WRITE(CBID2,'(G9.3)') XCUR
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,9)
        CBID(LL+1:LL+L+9) = '-xcentr='//CBID2(1:L)//' '
        LL = LL+L+9
      ENDIF
      IF (ABS((YCUR-YCUREF)/XLARG).GT.PETIT) THEN
        WRITE(CBID2,'(G9.3)') YCUR
        CALL ENLEVE_TOUS_BLANCS(CBID2,L,9)
        CBID(LL+1:LL+L+9) = '-ycentr='//CBID2(1:L)//' '
        LL = LL+L+9
      ENDIF
C
      IF (ICOURB.NE.-2.AND.ICOURB.NE.-3) THEN
        IF (ISORTIE.EQ.0) THEN
          PRINT*,' '
          IF (ILANG.EQ.0) THEN
            PRINT*,
     &'("'//PROGEFF(1:LPROGEFF)//' -h" pour la liste des options)'
            PRINT*,' '
            PRINT*,'Pour réafficher le même dessin, essayez :'
          ELSE
            PRINT*,
     &'("'//PROGEFF(1:LPROGEFF)//' -h" for the list of known options)'
            PRINT*,' '
            PRINT*,'To redisplay the same configuration, try:'
          ENDIF
          PRINT*,' '
Cfj        IF (INOPO.EQ.1) THEN
Cfj          NOM_FICH = NOM_FICH(6:LONG-7)//'nopo'
Cfj          LONG = LONG-8
Cfj        ELSEIF(INOPO.EQ.2) THEN
Cfj          NOM_FICH = NOM_FICH(6:LONG-7)//'amdba'
Cfj          LONG = LONG-7
Cfj        ENDIF
          IF (INOPO.NE.0) THEN
            NOM_FICH(1:LONG0) = NOMF0(1:LONG0)
            LONG = LONG0
          ENDIF
          IF (LL.GT.0) THEN
            WRITE(*,'(A)')
     &           PROGEFF(1:LPROGEFF)//' '//CBID(1:LL)//NOM_FICH(1:LONG)
          ELSE
            WRITE(*,'(A)')
     &           PROGEFF(1:LPROGEFF)//' '//NOM_FICH(1:LONG)
          ENDIF
          PRINT*,' '
        ELSE
          WRITE(ISORTIE,'(A)') '%> Options: '//CBID(1:LL)
        ENDIF
      ENDIF
C
      END
