!   TITLE:  view.mac (MANAGEMENT)
!
!
!   OBJECTIVE:
!
!   This sub-macro restores the view of the graphics window to the specified
!   direction relative to the active coordinate system.
!
!
!   COMMAND SYNTAX:
!
!        VIEW, vdir
!
!
!   ARGUMENTS:
!
!           vdir = the view direction. Valid options are:
!
!                   'f'     =   front view (XY plane, +Z out)
!                   'back'  =   back view (XY plane, +Z in)
!                   'l'     =   left view (YZ plane, +X in)
!                   'r'     =   right view (YZ plane, +X out)
!                   't'     =   top (XZ plane, +Y out)
!                   'bot'   =   bottom (XZ plane, +Y in)
!                   'iso'   =   isometric (1st octant)
!                   'o'     =   oblique view
!                   'siso'  =   spherical isometric (1st octant, +Z up)
!
!
!   DESCRIPTION:
!
!   The various standard view directions (i.e., front, back, top, etc.)may be
!   specifed in macros, or command line, to accomodate viewing without the use
!   of cumbersome line code and GUI picking.
!
!
!
*get,prkey_,active,0,prkey
/nopr

positn_=arg1
!
*if,positn_,eq,'f',then
    /VIEW, 1 ,,,1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'back',then
    /VIEW, 1 ,,,-1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'l',then
    /VIEW, 1 ,-1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'r',then
    /VIEW, 1 ,1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'t',then
    /VIEW, 1 ,,1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'bot',then
    /VIEW, 1 ,,-1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'iso',then
    /VIEW, 1 ,1,1,1
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'o',then
    /VIEW, 1 ,1,2,3
    /ANG, 1
    /REP,FAST
*elseif,positn_,eq,'siso',then
    view,'iso'
    /USER, 1
    /DIST, 1,   4.70404142620
    /ANG,  1,  -118.200000000
    /REPLO
*endif
!
/AUTO, 1
/replot

*if,prkey_,eq,1,then
    /go
*endif