*-----------------------------------------------------------------------
*     Copyright (C) 2000-2016 GFD Dennou Club. All rights reserved.
*-----------------------------------------------------------------------
      SUBROUTINE SCPLZV(N,VPX,VPY,VPZ,INDEX)

      REAL      VPX(*),VPY(*),VPZ(*)


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

      CALL SZL3OP(INDEX)
      CALL SZL3ZV(N,VPX,VPY,VPZ)
      CALL SZL3CL

      END
