Skip to main content

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.2\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: Core commands

The GWC file commands are listed as either core commands or view 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 the task is 0), analyse all unanalysed tasks if analysis tasks exist; otherwise do a 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.