
! script name: views.d/scaleview
! topic: scale view

!A
!A NAME:
!A
!A 	Scale View
!A
!A DESCRIPTION:
!A
!A 	This script allows a window to be scaled with X and Y limits.
!A
!B INSTRUCTIONS:
!B
!B 	PICK VIEW: Pick the view to be scaled.
!B
!B 	X MIN: Enter the minimum X value to be displayed.
!B
!B 	X MAX: Enter the maximum X value to be displayed.
!B
!B 	Y MIN: Enter the minimum Y Value to be displayed.
!B
!B 	Y MAX: Enter the maximum Y Value to be displayed.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: scaleview ")

DIM Answer$[256]
DIM Destination$[256]

Vnum=PickView("PICK VIEW")
IF (ExitScript(Destination$)) THEN Leave

stat= SetInputFormat("n4","")
Xmin=GetValue("X MIN",Answer$)
IF (ExitScript(Destination$)) THEN Leave

Xmax=GetValue("X MAX",Answer$)
IF (ExitScript(Destination$)) THEN Leave

Ymin=GetValue("Y MIN",Answer$)
IF (ExitScript(Destination$)) THEN Leave

Ymax=GetValue("Y MAX",Answer$)
IF (ExitScript(Destination$)) THEN Leave

Stat=ScaleView(Vnum,Xmin,Xmax,Ymin,Ymax)

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