
! script name: views.d/angleview
! topic: change XYZ rotation values for view

!A
!A NAME:
!A
!A 	Input View
!A
!A DESCRIPTION:
!A
!A 	This script allows the X,Y,Z rotation values for a view to be changed.
!A 	The default for Top, Front, Side, and Isometric are as follows:
!A
!A 		Top:        X=  0   Y= 0   Z=  0
!A 		Front:      X= 90   Y= 0   Z=  0
!A 		Side:       X= 90   Y= 0   Z= 90
!A 		Isometric:  X= 60   Y= 0   Z= 30
!A
!B INSTRUCTIONS:
!B
!B 	PICK VIEW: Pick the view to be changed.
!B
!B 	X ANGLE: Enter the X rotation value to be used for the view.
!B
!B 	Y ANGLE: Enter the Y rotation value to be used for the view.
!B
!B 	Z ANGLE: Enter the Z rotation value to be used for the view.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: input view ")

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

Vnum=PickView("PICK VIEW")
IF (ExitScript(Destination$)) THEN Leave
Xangle=GetValue("X ANGLE",Answer$)
IF (ExitScript(Destination$)) THEN Leave
Yangle=GetValue("Y ANGLE",Answer$)
IF (ExitScript(Destination$)) THEN Leave
Zangle=GetValue("Z ANGLE",Answer$)
IF (ExitScript(Destination$)) THEN Leave

Pt=PointXYZ(0,0,0)
T1=AngleTransform(Pt,Xangle,Yangle,Zangle)

Stat=ChangeView(Vnum,T1)

Leave:!
Stat=DeleteEntity(Pt)
Stat=DeleteEntity(T1)
IF (NOT LEN(Destination$)) THEN
	 LOAD "typecontrol"
ELSE
	 LOAD Destination$
END IF
END
