I just finished an APDL code, but it was taking too long to rebuild the nodal model:
!maximum node number
*get,n_max,node,,num,maxd
!temporary array
list_tmp=
*dim,list_tmp,array,n_max,11
!status of selection (masking vector)
*vget,list_tmp(1,1),node,,nsel
!filling array with...