Using Ansys 5.6 on Windows 2000.

Some problems occur with the Ansys Interactive menu pick which dissallow Ansys from starting on Windows 2000 machines which are not on the same subnet as the license server.  This is not a problem with Ansys or with the License Management software but seemingly only with ansysi.exe and its query of the license server.  There is a workaround which uses a batch file to call Ansys directly from the command line, however  there is no interactive window to enter run parameters like memory allocation or filenames--these must be entered into the batch file before running.  The first part of this help page discusses the batch file and the commands within it, the second part describes a method to aid


The Ansys Start Batch file: ansys_start.bat

The batch file is simply a textfile with .bat appended (filename.bat).  Double clicking on the batchfile runs the contained text file on a command line.  The ansy_start.bat file looks like this:

REM sets the current working drive if other than C:
F:

REM sets the working directory--must be in current working drive
cd F:\Ansys_work

REM calls Ansys with the appropriate parameters
C:\ANSYS56\bin\intel\ansys -g -d 3D -p ANE3 -db 128 -m 512 -j jobname

Where:
REM is used to mark comment or "remark" lines within the batch file--these lines are ignored in running
F: is the desired drive letter of the current working directory (defaults to C:)
F:\Ansys_work is the desired working directory (directory must exist prior to calling batch file)
C:\ANSYS56\bin\intel\  is the location on your computer of ansys.exe (in the batch command the ".exe" extension is ommited)

-g     sets Ansys to Graphical interface
-d     sets the display mode (3D uses graphics card Win32c uses standard windows display)
-p     sets the package used (ANE3 are the EMag licences, unset defaults to standard license)
-db   sets the size of the Ansys database in megabytes
-m    sets the total amount of memory that Ansys will use on your computer
-j      sets the jobname

Running the batch file is equivelant to typing the following at the command line
F:
cd F:/Ansys_work
C:\ANSYS56\bin\intel\ansys -g -d 3D -p ANE3 -db 128 -m 512 -j jobname

Ansys takes as the working directory the directory from which the ansys command is called.  The Ansys command is the last line where the absolute name of the Ansys executable has been used

Everytime a new job is run, it is necessary to edit the batch file at least to change the jobname.  It is also important to verify that the working directory exists and that the batch file is pointed at it.  If the directory is not found, the default working directory is the Ansys loadpoint--here it would be "C:\ANSYS56\bin\intel\"

You can download a copy of ansys_start.bat and put it anywhere you like, however for convenience it is good practice to put it in the same location as ansys.exe (C:\ANSYS56\bin\intel\).


The .ansysbat filetype

To help speed this process along, it is possible to set up a dummy filetype and set operating system actions for it which will allow you to modify the batch file more easily.  The end result will be a sort of shortcut which you can place anywhere allowing you to quickly edit the batch file, and then call the batch file to start Ansys.

Go to your control panel and click on the "Folder Options" icon.  The following window should open.

error-file:TidyOut.log
 

Select "New" and type anything you like preceded by a "." (period)--something like .ansysbat as shown below
 

error-file:TidyOut.log

Once you have a filetype defined, hit OK and proceed.  Make sure that the new filetype is selected and click on "Advanced"

error-file:TidyOut.log

Note:  Here you can also change the Icon of this new filetype--if you'd like the ansys icon, navigate to the ansys directory and pick it, or pick one of the default icons which is easy for you to recognize.

Now that you have defined a new filetype, your computer will recognize any file with that extension as this filetype.  What you will do next is tell the computer what actions you would like to perform when clicking on this filetype--note the actions don't necessarily have to act on the filetype (or even file) that is clicked on--a slight abuse of the mechanics, but perfectly valid.

Setting filetype actions is slightly more advanced than a "shortcut" which only points at a specific file, and uses the default action of that file.  Being able to set  filetype actions allows you to chose any application and act on any file in a proscribed way.  What is proposed here is to use the dummy filetype ".ansysbat" to operate only on the one file ansys_start.bat, and to use different actions of the .ansysbat filetype to do different things with ansys_start.bat.  Placing any file with the .ansybat extension anywhere is functionally creating a shortcut to either edit ansys_start.bat or run ansys_start.bat starting Ansys.  This differs from the normal form of the action by acting on a file that is different than the one selected.
Actions are defined for all filetypes--you access them by right clicking on any file openning the context sensitive menu.  The default action is bold and listed first--usually this is "Open" or some such action and the computer knows which application to use to acheive this--double-clicking usually activates the default action.  Auxilliary actions are listed after.

What we will do next is set up two actions for .ansysbat, the default will be to Edit ansys_start.bat, and the auxilliary action will be to Start Ansys with the modified ansys_start.bat.  Click on the "New..." button next to the "Actions:" pane.

error-file:TidyOut.log

Note:  "Action:" is the text that appears in the context sensitive menu--it is only a name.  Application used is actually the command.

Type something you will recognize into the Action box, in the Application box type:

notepad.exe "C:\ANSYS56\bin\intel\ansys_start.bat" "%1"





The syntax used in the Application box is:

application_command "absolute_filename" "%1"

Where:
application_command is the string typed at the command line which launches the desired application.  Generally this should be the absolute file name of the application, but many have been aliased within windows--notepad.exe is one of these

absolute_filename is the name of the file you wish to open preceded with its directory path from drive root.  the syntax requires enclosing the absolute_filename in quotes.  Note:  generally this is left blank and the application takes the file selected (right or double clicked) for the filname.

%1 is automatically added, but it doesn't hurt to type it--it is usually only needed when a filename is specified.


The above action will open ansys_start.bat in notepad everytime you double-click on any .ansysbat files.  Any .ansysbat file anywhere on your machine will yield the same result.  It is automatically set as the default action as it is the only action defined.  We can set another action to start Ansys using the ansys_start.bat file.  We will not make it the default action so that we can't easily accidentally start Ansys with the wrong batch file--recall you have to edit the batch file to change even the jobname.  With the following action, you can start Ansys by right-clicking on any .ansysbat file and selecting Start Ansys.

error-file:TidyOut.log

Note:  This action calls the batch file directly.

error-file:TidyOut.logerror-file:TidyOut.log

Note:  The icon has been set to the Ansys Icon--the box next to this icon is descriptive text describing what the filetype is.  The menu to the right is what you will see if you right-click on any file of this new type--see how the default and auxilliary actions appear at the top of the menu?

Now, you can place a .ansysbat file anywhere you would like a shortcut to start ansys.  By using filetype and actions you have made intelligent shortcuts allowing you to accomplish multiple things with one shortcut using the context sensitive menu structure provided by Windows.  To start Ansys, right-click on any .ansysbat file and select "Start Ansys 5.6" from the menu.  To create .ansysbat files create a text file anywhere you like and rename it with the .ansysbat extension--nothing inside the file is of any importance.