If you're running the Mechanical APDL program interactively, you can call a GUI picking menu from within a macro. To do so, simply include a picking command in the macro. Many Mechanical APDL commands (such as K,,P) accept the input "P" to enable graphical picking. When Mechanical APDL encounters such a command, it displays the appropriate picking dialog and then continues macro execution when the user clicks OK or Cancel.
Keep in mind that picking commands are not available in all Mechanical APDL processors, and that you must first switch to an appropriate processor before calling the command.
Note: If a macro includes GUI functions, the /PMACRO command should be the first command in that macro. This command causes the macro contents to be written to the session log file. This is important, because if you omit the /PMACRO command, Mechanical APDL can't read the session log file to reproduce the Mechanical APDL session.