Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[APDL] Using characters in *IF command

Status
Not open for further replies.

protrader

Mechanical
May 26, 2008
24
0
0
CA
I want to use characters s,r and a pretty much like what we have in lsel command or any other selection commands in a macro as the selection type using *if command.

With numbers it works well but I could not find any way to get it run with letters instead.

Here is a simple macro. If for example we save it with .mac extension under "test" name (test.mac) when we execute test,a it must show the message " you have entered a" and so on.

Where is my mistake?

/prep7

*if,arg1,eq,a,then
*msg,ui
you have entered a
*elseif,arg1,eq,b
*msg,ui
you have entered b
*else
*msg,ui
you have entered another letter
*endif
 
Status
Not open for further replies.
Back
Top