The Ansys Innovation Space website recently experienced a database corruption issue. While service has been restored there appears to have been some data loss from November 13. We are still investigating and apologize for any issues our users may have as a result.

Ansys Learning Forum Forums Discuss Simulation General Mechanical Getting type string data from Mechanical script to APDL Command Snippets (via ARGs or otherwise) Reply To: Getting type string data from Mechanical script to APDL Command Snippets (via ARGs or otherwise)

Erik Kostson
Ansys Employee
Hi

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

Erik