Erik Kostson
Ansys Employee

We can not put a text as an argument (ARG1 say).

One workaround is to print with ACT the named selection to a text file and then read that text file with apdl (see perhaps TREAD and *DIM command on how to read in a text file). Then you will have access to all the names in a table (*DIM).

Another way is to use just apdl commands to get the named selections since they are defined in the ds.dat as components (CM). These commands are relevant to get the total number of components and the name of the first and second one.
*GET,mycm, COMP, 0,NCOMP *GET, myfcm,COMP, 1,NAME
*GET, myscm,COMP, 2,NAME
All the best