! TITLE: ln_part_ln.mac (SM_TOOL) ! ! ! Added *set commands to undefine variables ! ! Redesigned logic format. ! ! ! This sub-macro is used to partition a selected set of lines by using ! a single cutting line, LCUT. It then restores the selected set to the ! full model set that is currently under construction. Input variables ! are as follows: ! ! A selected line set (including the cutting line(s)) ! ! lcut = line number used to partition line set ! ! ! ! LN_PART_LN, lcut ! ! *get,prkey_,active,0,prkey /nopr _lcut=arg1 ! *get,_lcnt,line,,count ! Total count of lines. *get,_l2bcut,line,,num,min ! Retrieve minimum line number to begin ! ! iterations. *if,_lcnt,eq,2,then _lcnt=_lcnt-1 *endif ! *do,_ijk,1,_lcnt,1 ! *if,_ijk,ne,_lcnt,then _kdv='keep' ! keep/delete decision variable *else _kdv='delete' *endif ! *if,_l2bcut,ne,_lcut,then *if,lsel(_l2bcut),eq,1,then lsbl,_l2bcut,_lcut,,delete,_kdv *endif *endif ! *if,_lcnt,eq,2,then *exit *endif ! _lhold=_l2bcut *get,_l2bcut,line,_lhold,nxth *enddo ! init_entity_num ! *set,_lcut, *set,_l2bcut, *set,_lcnt, *set,_kdv, *set,_lhold, *set,_ijk, *if,prkey_,eq,1,then /go *endif