!   TITLE:  aslc.mac (MANAGEMENT)
!
!
!   OBJECTIVE:
!
!   Area Select by Coordinate
!
!   COMMAND SYNTAX:
!
!               (1) (2) (3) (4)
!        ASLC, Type, X,  Y,  Z
!
!
!   ARGUMENTS:
!
!       (1) Type = label identifying the type of area to select:
!
!                   's' = Select a new set (default).
!                   'r' = Reselect a set from the current set.
!                   'a' = Additionally select a set and extend the current set.
!                   'u' = Unselect a set from the current set.
!
!       (2) X = First coordinate in the active coordinate system
!
!       (3) Y = Second coordinate in the active coordinate system
!
!       (4) Z = Third coordinate in the active coordinate system
!
!
!   DESCRIPTION:
!
!   Selects those areas containing the keypoint at the specified coordinate.
!
!
*get,prkey_,active,0,prkey
/nopr
! Store away current line and kp selection
cm,cur_kp_,kp
cm,cur_l_,line

kp_num_=kp(arg2,arg3,arg4)

ksel,s,kp,,kp_num_

lslk,s,0
asll,arg1,0

! Restore the kp and line selection
ksel,s,kp,,cur_kp_
lsel,s,line,,cur_l_

*set,cur_kp_
*set,cur_l_
*set,kp_num_


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