!   TITLE:  ara_part_line.mac (SM_TOOL)
!
!
!   This sub-macro is used to partition a selected set of areas by using
!   a cutting line, LCUT.  It then restores the selected set to the full
!   model set that is currently under construction.
!
!   In the case that the cutting line LCUT is a component group of lines,
!   then simply place the component group name in single quotes in the
!   first argument.
!
!
! ARA_PART_LINE, lcut
!
!
*get,prkey_,active,0,prkey
/nopr

_lcut=arg1
!
*get,_alow,area,,num,min
*get,_ahigh,area,,num,max
!
*do,_iii,_alow,_ahigh,1
    *if,_alow,eq,_ahigh,then
        _kdv='delete'
    *else
        *if,_iii,ne,_ahigh,then
            _kdv='keep'             ! keep/delete decision variable
        *else
            _kdv='delete'
        *endif
    *endif
    !
    *if,asel(_iii),eq,1,then
        asbl,_iii,_lcut,,delete,_kdv
    *endif
*enddo
!
*get,_ptyp,parm,_lcut,type
!
*if,_ptyp,eq,3,then
    ldele,_lcut,,,1
*endif
!
*if,_ptyp,ne,3,then
    *if,lsel(_lcut),ne,0,then
        ldele,_lcut,,,1
    *endif
*endif
!
init_entity_num
!
*set,_kdv,
*set,_alow,
*set,_ahigh,
*set,_lcut,
*set,_iii,
*set,_ptyp,

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