5.1. Prompting Users for a Single Parameter Value

www.kxcad.net Home > CAE Index > ANSYS Index > Release 11.0 Documentation for ANSYS


Your Ad Here

By including the *ASK command within a macro, you can have the macro prompt a user to type in a parameter value.

The format for the *ASK command is

*ASK,Par,Query,DVAL

Where

The *ASK command prints the Query text on the screen and waits for a response. It reads the response from the keyboard except when ANSYS runs in batch mode. (In that case, the response or responses must be the next-read input line or lines.) The response can be a number, a one-to-eight character string enclosed in single quotes, a numeric or character parameter, or an expression that evaluates to a number. ANSYS then sets the value of Par to the read-in response. The following example displays the dialog box shown below, then sets the parameter PARM1 to the value the user enters.

*ask,parm1,'username (enclose the username in single quotes)'

Figure 5.1  An Example *ASK Dialog Box

When you issue *ASK within a macro, ANSYS writes the user's response to File.LOG on the line following the macro name.

Your Ad Here