*-----------------------------------------------------------------------
      SUBROUTINE SGPLXV(N,VPX,VPY,ITYPE,INDEX,ICOLOR)

      REAL      VPX(*),VPY(*)
      LOGICAL LFCATR

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

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

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

      CALL SZPLOP(ITYPE,INDEX)
      CALL SZPLZV(N,VPX,VPY)
      CALL SZPLCL

      CALL SWSFCM(.FALSE.)

      END