|
|
|
|
Using Windows file extension association for ANSYS files
|
| |
Q: It appears that at ANSYS Release 5.6, the file extensions .db and .dbb are
now associated so that ANSYS starts up when the user double clicks on either
file type. This is a nice feature, but can you supply more information on how
it works?
A: This feature uses the last settings specified in ANSYS Interactive menu via
the command
C:\ANSYS56\bin\Intel\ansysir.exe -FILE
where "ansysir" is Run Interactive Now, using the last settings.
Since it uses the last settings, that means that your working directory and
jobname need to be the same as last specified in "ANSYS Interactive" menu
(ansysi). Otherwise, you may get unexpected results when using regular SAVE
and RESUME commands and when looking through your log file.
If you prefer, you can create your own association as described below:
1) Create a DOS batch script as follows:
----------launch_ansys55.bat----------
@echo off
set PATH=C:\ansys55\bin\intel;%PATH%
set ANSYS55_PRODUCT=ane3flds
start ansys -j %~n1 -m 128 -db 32 -siresume yes -d 3d -g
----------end of file-----------------
2) Modify your start55.ans file as follows (or something similar):
----------add to start55.ans----------
*get,SISTATUS,parm,SIRESUME,type
*if,SISTATUS,eq,3,then
*if,SIRESUME,eq,'yes',then
resume
*endif
*endif
--------------------------------------
3) Modify your association with *.db files such that it opens the following
command:
C:\location_of_scripts\launch_ansys.bat "%1"
Now, when you double-click on the .db file, it runs ANSYS in that working
directory with that specific jobname. This makes opening older databases
easier, so you won't have to worry about jobnames and such.
Also, if you want to get fancier, you can have multiple commands in step (3) in
Windows Explorer. You can have one that uses a certain license product or
certain memory settings. That way, when you right-click on a *.db file, you
can create the following pop-up menu:
"Open"
"Open with Multi 128/32"
"Open with Mech 64/16"
where each of the above two commands refers to different batch files
(launch_ansys1.bat, launch_ansys2.bat), each having different license and
memory settings.
Another more powerful feature you can utilize is to run a batch job in this
same way (right-click on either a *.db or *.inp file and run a custom command in Windows
Explorer). This would be easy if your batch files are the same as your jobname
with a specific extension (such as "jobname.inp" for input files).
The method described here do not assume a certain revision of ANSYS. In other
words, you can use this file association (i.e., use Windows Explorer to
double-click on a *.db or *.grph file to open it) with any version of ANSYS
(5.4, 5.5, 5.6). You can even use a custom right-click popup menu to run
either 5.4, 5.5, or 5.6, in case you need to use an older release for a given
database.
Please also refer to CSI's Tip of the Week on Windows File Association with ANSYS files.
|
| |
| |
|
Adding ANSYS file association via Windows registry
|
| |
This tip creates a new right-click menu option to start ANSYS in a selected working folder with the GUI on.
- Create a new sub key called 'Command' under the key
[HKEY_CLASSES_ROOT\Directory\shell\Command]
Change the value of '(Default)' within the key to the text you would like on the right-click menu, for example 'ANSYS Here'.
- Create another new sub-key under the key created above, named 'command'
i.e. [HKEY_CLASSES_ROOT\...\Command\command]
Change the value of '(Default)' to
ansys -dir %1 -g
If the ANSYS directory is not specified in the PATH variable then replace ansys with the full path. You can change the command line options to suit your own needs.
|
| |
| |
|
|