*-----------------------------------------------------------------------
      SUBROUTINE SGPLXU(N,UPX,UPY,ITYPE,INDEX,ICOLOR)

      REAL      UPX(*),UPY(*)
      LOGICAL LFCATR

      CALL SWQFCC(LFCATR)
      IF(.NOT.LFCATR) THEN
        CALL MSGDMP('M','SGPLXU','FULL COLOR MODE IS NOT SUPPORTED.')
      END IF

      IF (N.LT.2) THEN
        CALL MSGDMP('E','SGPLXU','NUMBER OF POINTS IS LESS THAN 2.')
      END IF
      IF (ITYPE.EQ.0) THEN
        CALL MSGDMP('M','SGPLXU','LINETYPE IS 0 / DO NOTHING.')
        RETURN
      END IF
      IF (INDEX.EQ.0) THEN
        CALL MSGDMP('M','SGPLXU','POLYLINE INDEX IS 0 / DO NOTHING.')
        RETURN
      END IF
      IF (INDEX.LT.0) THEN
        CALL MSGDMP('E','SGPLXU','POLYLINE INDEX IS LESS THAN 0.')
      END IF

      CALL SWSFCM(.TRUE.)
      CALL SWSLCL(ICOLOR)

      CALL SZPLOP(ITYPE,INDEX)
      CALL SZPLZU(N,UPX,UPY)
      CALL SZPLCL

      CALL SWSFCM(.FALSE.)

      END
