
! script name: views.d/pickview
! topic: pick view plane by element

!A
!A NAME:
!A
!A 	Pick Entity's View
!A
!A DESCRIPTION:
!A
!A 	This script allows a view plane to be picked from an element.  The
!A 	view is modified to a view in which the workplane of the element is
!A 	seen face on.
!A
!B INSTRUCTIONS:
!B
!B 	PICK VIEW: Pick the view to have the workplane modified in.
!B
!B 	PICK ENTITY TO DETERMINE VIEW PLANE: Pick the entity that should be
!B 		used for determining the view plane.
!B

stat=ChangeLabelStr("ScriptNameStatus","Function: pick entity's view ")

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

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

E1=PickEntity("PICK ENTITY TO DETERMINE VIEW PLANE")
IF (ExitScript(Destination$)) THEN Leave

Stat=ChangeView(Vnum,E1)

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