
! script name: 3drender.d/pexview
! 3dtopic: Dynamic viewer

!A
!A NAME:
!A
!A 	pexview
!A
!A DESCRIPTION:
!A
!A 	This script is an interface to the PEX Surface viewer.
!A
!B INSTRUCTIONS:
!B
!B 	PICK SURFACE GROUP: Pick the group of surfaces to viewed.
!B
!B 	TOLERANCE: Enter the amount of variation allowed.  The tolerance
!B 		should be set similar to shading.  Do not set the tolerance
!B 		too small.
!B
!B 	IMAGE FILE NAME (MAX=10): Enter the name of the image to be used
!B 		for storage purposes.  Maximum number of characters is 10.
!B

Stat=ChangeLabelStr("ScriptNameStatus","Function: PEX viewer")

DIM Destination$[256]
DIM Answer$[256]
DIM Proc$[256]
DIM Jobname$[256]
DIM Space$[20]

DeActivateUndo
Space$=" "
Jobname$="tileview"

Start:!

Question:!
        Stat=SetInputFormat("a99=","")
	Stat=SetEqualsValue(0,Jobname$)
        Stat=GetValue("IMAGE FILE NAME"&Space$&"(MAX= 10) ",Jobname$)
        IF ExitScript(Destination$) THEN Leave
        IF POS(Jobname$," ") THEN
                Space$=" (NO SPACES) "
                GOTO Question
        ELSE
                Space$=" "
        END IF
        IF LEN(Jobname$)>10 THEN Question
        IF LEN(Jobname$)=0 THEN Jobname$="tileview"

Proc$="/usr/weber/bin/pexview.sh "&Jobname$
Stat=StartProcess(Proc$)

GOTO Start

Leave:!
IF NOT LEN(Destination$) THEN
	LOAD "typecontrol"
ELSE
	LOAD Destination$
END IF
END
