******************************************************************************** * EnSight 6.1 Command Prompting ******************************************************************************** EnSight 6.1.0 introduced the ability to set up most commands to prompt the user for command values. The prompting mechanism is very simple. All you need to do is change the command value to two question marks and then the question you wish to ask the user. An example of this is: view: hidden_surface OFF This command can be changed to: view: hidden_surface ??Would you like the model shaded(ON/OFF)? When this command is executed a prompt will be displayed showing the question with an input box. The user will type the value into the input box and click Okay. As you can see it is best to provide the user with a list of possible values that they are allowed to type in. Your prompt to the user must all be on the same line. We have not provided a line continuation character so you may find some of your prompt lines become long. Your prompt can contain a newline(\n) character, which will cause the prompt displayed to the user to be a multiple line prompt. An example using the newline character is shown in 2) below. The best way to create command files is to walk through the task using the EnSight user interface first, then go back through the command file and modify the commands slightly. We have also added a few other command language features to make the command files more flexible. These are: 1) We have added two test commands to toggle how to record parts in the command language. The commands are: test: cmd_rec_partname and test: cmd_rec_partnumber The default is to record as part number. These commands can be entered in the command dialog command entry field or placed in a command file and executed. There are a few areas where this has not been implemented though, such as: variables: evaluate TPres = TPres(1,temperature,velocity,2) In the above command the part number 1 has been entered by the user when setting up the equation for the command. This command can be set up to allow the user to be prompted by changing it to variables: evaluate TPres = TPres(plist,temperature,velocity,1) The "plist" key word will use whatever is in the current command language selection list. To set the command language part selection list you must use the method described in 2) below. 2) To prompt the user for a part or parts, to add to the command part selection list, do the following: part: select_partname_begin ??Select the parts in the main part list that you wish\nto create a new variable on. Then select Continue. part: select_partname_end part: get_mainpartlist_select another example of this is: part: select_partname_begin ??Select the parts in the main part list that you wish\nto create an Isosurface from. Then select Continue. part: select_partname_end part: get_mainpartlist_select The part selection prompt will cause the command language to be interrupted. This will give the user a chance to select the parts they wish to use. Since the command language is interrupted the user will have to click the "Continue" button in the command dialog that automatically pops up. 3) To prompt the user for a variable to add to the command variable selection list, do the following: variable: select_varname_begin ??Select the variable(s) from the main variable list that you\nwish to create an Isosurface from and then select Continue. variable: select_varname_end variable: get_mainvarlist_select The variable selection prompt will cause the command language to be interrupted. This will give the user a chance to select the variable they wish to use. Since the command language is interrupted the user will have to click the "Continue" button in the command dialog that automatically pops up. 4) To prompt the user for a legend to add to the command legend selection list, do the following: legend: select_palette_begin ??Select the variable(s) from the main variable list that you\nwish to display legend(s) for and then select Continue. legend: select_palette_end legend: get_mainvarlist_select Another new command that should be mentioned here is a command that selects all the parts in the main part list. This is useful when you want to do an operation on all of the parts in the command language and may not know how many parts are in the current model. To use this you would use the following set of commands: part: select_mainpartlist_all part: get_mainpartlist_select As you will see, this is a first try at making the command language more useful for creating general sequences of operations. We felt that the current capability is useful enough to provide it as a new feature in the 6.1.x release. It can be very handy when used with Macros. We understand that we could do much more with it and that it has some current gotchas. One of these "gotchas" is the fact that text, line, and logo command language still uses numbering and therefore those commands are dependent on the text, line, and logo annotation that currently exist in the EnSight session. We are sure there are others that we haven't thought of yet, but we now have the basic prompting in place to build from. We will be looking into adding programming language constructs to continue to enhance the EnSight command language. We welcome any ideas that you feel are necessary to make command language even more useful. Please send your experiences and requests to ensight_support@ceintl.com so that we can consider them when enhancing the command language in the future.