# Command File
The command file allows access to certain (basic) GSA operations by specifying these in a text file called a command file, identified by a GWC extension. The command file can then be run from the Windows “Run” command by typing
gsa <filename>
On machines that have access to several versions of GSA it is necessary to be explicit in specifying the version of GSA that is to be run. For example:
c:\program files\oasys\gsa 10.1\gsa
c:\data\ex.gwc
The double quotes are necessary when the path includes spaces.
Alternatively the command file can be run when in GSA by selecting a GWC file in the “File | Open” command.
A log file will be created to record the execution of each of the commands in the GWC file.
The rules for a command file are as follows:
- The command file consists of a series of records, each record consisting of a command followed by any required arguments in parenthesis and separated by commas.
- There may only be one command per line and only one line per command.
- The commands are not case sensitive.
- Text following a comment marker, //, is ignored.
- Commands can optionally finish with a semi-colon character.
- White spaces are ignored except within quoted strings.
- Blank lines (no space or tab characters) are acceptable.
- Where command arguments are strings these should be enclosed in double quotes (e.g. "test.gwb")
# Command File Commands
The GWC file commands are listed as either core commands or view commands.
Core commands
{
Special command to mark the start of a command sequence.
}
Special command to mark the end of a command sequence.
Open (filename)
Open a GWB, GWA or CSV file.
filename – the name of the file to be opened, including path and extension.
Save ()
Save the data to the default file (i.e. overwriting the file that was opened or last saved).
SaveAs (filename)
Save the data to GWB, GWA or CSV file.
filename – the name of the file to be saved, including path and extension.
Close ()
Close the current file.
Exit ()
Close the file and exit GSA.
Analyse ()
If task exists, analyse the task.
If no task is specified(or task is 0), analyse all unanalysed tasks if analysis tasks exist; otherwise do linear static analysis of each specified load case.
Delete (option)
Delete results.
option – valid settings are:
RESULTS – delete all results but not analysis cases.
RESULTS_AND_CASES – delete all results and analysis cases.
# View commands
PrintView (option)
Print saved or preferred Graphic Views or Output Views.
option – valid settings are:
ALL_PGV – print all preferred Graphic Views.
ALL_SGV – print all saved Graphic Views.
ALL_POV – print all preferred Output Views.
ALL_SOV – print all saved Output Views.
ALL_LST – print all View Lists.
TAGGED_PGV – print tagged preferred Graphic Views.
TAGGED_SGV – print tagged saved Graphic Views.
TAGGED_POV – print tagged preferred Output Views.
TAGGED_SOV – print tagged saved Output Views.
TAGGED_LST – print tagged View Lists.
<name> – print the first view or view list found with the specified name.
SaveViewToFile (option, filetype)
Save saved or preferred Graphic Views or Output Views to file.
option – valid settings are:
ALL_PGV – save all preferred Graphic Views.
ALL_SGV – save all saved Graphic Views.
ALL_POV – save all preferred Output Views.
ALL_SOV – save all saved Output Views.
ALL_LST – save all View Lists.
TAGGED_PGV – save tagged preferred Graphic Views.
TAGGED_SGV – save tagged saved Graphic Views.
TAGGED_POV – save tagged preferred Output Views.
TAGGED_SOV – save tagged saved Output Views.
TAGGED_LST – save tagged View Lists.
<name> – save the first view or view list found with the specified name.
filetype – valid settings are:
WMF – save Graphic Views to WMF file.
PNG – save Graphic Views to PNG file.
JPG – save Graphic Views to Jpeg file.
TXT – save Output View to tab delimited TXT file.
CSV – save Output View to comma delimited CSV file.
HTM – save Output View to HTML file.