GHS Version 08.50 Update
New features, changes, and bug fixes since version 08.00
=========== MAJOR NEW FEATURES =========
New GHSCOM Module
GHSCOM provides access to the GHS (General HydroStatics) main calculating engine through Microsoft COM technologies. This allows GHS to be tightly integrated into other programs. Any application written in a language that supports the COM calling convention can link to GHS through the GHSCOM module. Such languages are,
• C/C++
• C#
• Delphi
• Java (COM Bridge)
• Visual Basic
• Visual Basic for Applications (VBA)
• VB Script
VBA is of particular interest since common application programs support VBA including Microsoft Office and AutoCAD. This means that a GHS user can write VBA functions in Excel, for example, and with very little effort have a spreadsheet with cells that call GHS functions.
GHSCOM is an optional module of GHS and cannot be used independently of a GHS license.
ADD
Distributed weights may now be set to zero (either using the ADD command or
in Load Editor) without losing their internal structure. If ADD set all
point weights to zero in a distributed list, then each point shares equally
when given weight in Load Editor. Alternatively, ADD can set up a non-equal
distribution using non-zero points weights, but assign the total weight of
the entire distribution to 0 by preceding the list with "0;" prefix.
DAMSTAB
DAMSTAB parameter /EXPERIMENTAL causes inner compartments to be considered
only within the division length when deciding whether the bottom is low
enough to be flooded.
DAMSTAB /SDIHC and DAMSTAB /SDIHR are preliminary implementations of revised
SOLAS regulations for probabilistic damage calculations applying to
Conventional and RO-RO vessels respectively.
Protections against user input of division ends extending beyond ends of ship
were added to the DIVISION command. Also The Subdivision Length terminals
given by the /LS parameter on the DAMSTAB command must not be inside of the
extreme ends of the divisions or an error message is triggered.
In order to support the A265 6.d.iii probabilistic damage provision for special
treatment of multiple-division damage cases "prior to equalization",
DAMSTAB /SDIP now checks for heel exceeding 20 degrees or downflooding when
damage flooding does not include tanks marked with "+", and assigns S=0 in
such cases, ignoring the minimum GM requirement and allowing it to continue in
those special cases.
DIVISION
DIVISION now accepts up to three WING bulkhead distances from shell.
DISPLAY
DISPLAY PRINT /PREVIEW parameter added to view a geometry report on the screen.
SE and DISPLAY commands now run SE32.EXE, the Windows version of
Section Editor.
DISPLAY STATUS command now runs CG32.EXE, the Windows version of
Condition Graphics.
DISPLAY STATUS /MAX parameter starts Condition Graphics in a maximized
window.
LOAD
Load solving for zero righting arm in heel is now available with the LOAD RAH
command.
LOAD RAH and LOAD RAT now both take into account external heeling and trimming
moments when the axis angle is zero.
LOAD itemlist = loadfraction command now works with distributed weights.
LOAD DELTA, RAT and RAH now set the tank loads to 1.0 or 0.0 if the available
capacity is insufficient to make the desired change.
LOAD EDIT
Load Editor supports Ctrl-N to rename an item in Weight and Ground Point modes;
by editing its description; this key only functions while the cursor is in
the leftmost "Description" column.
Load Editor Tank Load and Load% columns now accept "*IN" to make intact all
damaged and flooded tanks in the edit list.
Load Editor "CtrU" for toggling Ullage/Sounding mode appears in key menu
when the cursor is in the rightmost Tank column.
Load Editor with cursor in leftmost column advertizes Ctrl-Ins and Del keys
for appending new items and deleting in Weight and Ground Point modes.
Load Editor starts in first column with Ctrl-Ins advertized if no weights
are present. Del key is not advertized for items not eligible for deletion.
LOAD EDIT /NOGROUND parameter omits Ground Point mode from Tab rotation.
LOAD EDIT /HELP:helpfile spawns a single VIEW of helpfile by keying Ctrl-Y.
LS
New LS parameters:
/NOWEIGHT - Uses the buoyancy curve as the load curve, producing "s-value" shear and bending moments.
/STERNZERO - Useful with /NOWEIGHT - causes the s-value curves to begin at zero from the stern end.
/NOPRINT - Causes the LS command to produce no report output but rather to set values in certain user
variables if such variables exist when the /FRA parameter is present. The variable names begin with
frame names followed by suffixes having the following meanings:
Variable Suffix Meaning
$SF Shear force at this frame
$SQ Shear force fraction of limit at this frame
$BM Bending moment at this frame
$BQ Bending moment fraction of limit at this frame
MC
MC command now runs MC32.EXE, which converts larger models faster due
to full use of Windows memory.
MENUS (PULLDOWN)
Report menu has a new Setup printer submenu, with options to set the
Primary printer, Secondary printer, Paper size, Footer Text, and Footer Logo.
File Change Directory menu selection was added.
There is a new Wizard menu, listing categories of wizards (plus a catchall
category for all wizards). Choosing a category brings up a dialog box listing
all the wizards in the category existing in either the current directory or
the key file directory (which is usually the same as the program directory).
A wizard can be run by double-clicking or selecting the Run button while
selected; a wizard can be edited by selecting it and pressing the Edit button.
File Library dialog box now lists *.LF files instead of *.LIB files
(which often get confused with libraries from other applications).
File Library menu selection has been changed to bring up a dialog box
similar to the Wizard dialogs, listing *.LF files in the current and key file
directory for running or editing.
Report Preview current output menu selection was added to preview current
report without closing it.
MESSAGE
MESSAGE HEADSTART starts a series of NOTE or MESSAGE commands, terminated by
MESSAGE HEADEND. Any enclosed command lines are treated as a header for
screen output, displayed in reverse video, protected from scrolling off the
screen until the next output by a command other than NOTE or MESSAGE.
These commands are only effective when executing a macro or run file.
MESSAGE SPLASH ON/OFF turns on or off the startup splash display, which
appears after program installation or update release (superseding the logo).
The splash appears before running any save or library files, but only in the
absence of an explicit run file on the command line.
SCREEN
SCREEN MAX[:charwidth] optional parameter was added to specify the desired
character width in pixels (default=10) when the GHS32 window is maximized.
SCREEN GRAPH:n sets watermark muting factor from 0.0 to 1.0
SCREEN LOGO [filespec] reloads the splash image, optionally from the given
filespec to override progname.BMP; this image is still cleared by READ or CLS.
SC L abbreviates SCREEN LOGO.
SCREEN NOGRAPH suppresses geometry view watermark, so splash image is not
cleared by READ (only by CLS); SCREEN GRAPH resets to normal. When a geometry
is active, SCREEN LOGO implicitly does SCREEN NOGRAPH to show the logo.
SCR LOGO works with optional ":" and uses .BMP as default extension.
TEMPLATE
Template dialog boxes
I. Template Command
The TEMPLATE command creates interactive dialog boxes. Its syntax is:
TEMplate name ["title"] [param]...
If a "title" is present, then it appears in the title bar of the dialog box
when the template is executed; if not, the template name is the default title.
The TEMPLATE command is followed by a series of lines specifying the layout
of the template dialog box, terminated by a "/" line.
The following optional parameters may appear on the TEMPLATE command line:
/POS: position
Specifies the location of the dialog box relative to the parent window.
Valid position choices are: MIDDLE (default), TOPLEFT, TOPRIGHT, BOTTOMLEFT,
BOTTOMRIGHT (the four corners), LEFT, RIGHT (at vertical middle), TOP, BOTTOM
(at horizontal middle), CENTER (center of screen), and MOUSE (centered under
the current position of the mouse).
/SIZE: size
Specifies the dialog font size. Valid size choices are: MEDIUM (default;
corresponds to command area character size), SMALL (menu character size), and
LARGE (maximized character size).
/FONT: "font,..."
Specifies a list of one or more fonts used for the dialog box. If the first
font is not found on the system, then any further fonts are tried in order;
if none are found, then MS Sans Serif is used if the /SIZE parameter is
present; otherwise the Windows System font is used as the default font.
/BEEP
Beeps before popping up the dialog box (useful for warning messages).
II. Template Execution
Templates are executed using the command "EXecute name" (or ".name"), where
"name" is the template name. Any parameters following ".name" are substituted
for "%1", "%2", etc. appearing inside the template (the same as for macros).
When a template is executed, a dialog box pops up containing the specified
fields arranged neatly in rows and columns. Data can be edited in variable fields, or in the case of multiple choice variables, a label can be picked
from a drop-down list to assign the variable the corresponding value.
Other fields appear as labeled buttons. Pressing a button triggers an action,
after which control returns to the dialog, or the dialog exits if the button
field was marked with the word "EXIT".
III. Template Format
Templates are composed of multiple lines containing one or more fields,
with "|" separating multiple fields within a line. The template is terminated
by a "/" line. Each field has the following general syntax:
["label"[:value]...] [EXIT] [type] [name] [param]...
Here are the specific formats for each valid field type:
"text"
["label"[:value]...] [VARI] name
["label"] [EXIT] FILE|DIR name [/EXT:"exts"] [/SHORT] [/EXIST] [/START]
["label"] [EXIT] . name [(rep)] [param]... [/NOVERify] [/START]
["ok" ["cancel"]] EXIT
Blank lines in a template create blank lines in the corresponding dialog box.
IV. Template Field Types
A. Text Fields
"text"
Text fields are surrounded by quotes and appear verbatim in the dialog box.
If a text field precedes a non-text field on the same line, then it appears
right-justified as a tag before the non-text field.
B. Input Variable Fields
["label"] [VARIable] name
An unquoted variable name appears in the dialog box as an edit field control,
initially set to the value of the variable. The user can edit this value or
input a new one. The named variable is updated with the new value only when
the dialog box exits or an execute button is pressed.
The variable name may optionally be preceded by the "VARIable" field type;
this is only necessary if the variable has an ambiguous name such as "EXIT"
or "FILE". If a "label" is present, it appears as a right-justified tag, as
if "|" had been used to separate a text field followed by a variable field.
C. Multiple Choice Variable Fields
"label"[:value]... [VARIable] name
If more than one "label" or value is present before the variable name,
then a drop-down list control appears, which the user can click to choose
any "label" from the list. The named variable is updated with the selected
"label" choice when the dialog box exits or an execute button is pressed.
However, if the "label" is followed by ":" and a value, then the named
variable is updated with that value (either a number or a quoted string)
instead of the "label" appearing in the drop-down list.
D. File and Directory Button Fields
["label"] [EXIT] FILE|DIR name [/EXT:"exts"] [/SHORT] [/EXIST] [/START]
FILE and DIR fields appears as push buttons which pop up file and directory
selection dialog boxes. If this selection box is not canceled, the named
variable is updated with the selected long pathname when the template dialog
box exits or an execute button is pressed. The variable name appears on the
button face, replaced by "label" if present.
If FILE or DIR is the only field in a template, then the template dialog is
bypassed when executed, going directly to the file or directory dialog box.
If /EXT:"exts" is present, then only files or directories ending in the
specified comma-separated list of extensions (which may contain "*" and "?"
wildcards) are listed and can be selected from the dialog box. If one of
these extensions is "*", then the others are the default "Files of type",
with "All files" available from the "Files of type" drop-down list.
If /EXIST is present, the user is forced to select an existing file or
directory from the dialog box, rather than potentially create a new one.
If /SHORT is present, the selected file or directory must reside in the
starting directory, which is trimmed from the long pathname before storing the
filename and extension in the named variable (or just a short filename and
extension if the named variable was sized as a 12 character maximum string).
If a single non-wildcard extension was given with the /EXT parameter, then
just the long filename is stored in the named variable (or just the short
filename for a 8 character maximum variable).
FILE and DIR dialog boxes start in any directory preset in the named variable,
or the current directory if none. For the simplified DIR dialog box that
appears when /SHORT is present, any preset directory is the initial selection
and its parent directory is the starting directory; to specify a starting
directory with no initial selection, preset a directory name ending in "\".
If EXIT is present, the template dialog box exits instead of being restored
following processing of a pressed FILE or DIR button. If /START is present,
the FILE or DIR button has startup focus, triggered when Enter is pressed.
E. Execute Button Fields
["label"] [EXIT] . name [(rep)] [param]... [/NOVERify] [/START]
An execute button field appears as a push button which executes the named
macro or subtemplate. The original template dialog box is hidden while
execution is in progress. Since any GHS command is available within a macro,
execute buttons can be used to create very powerful control panel dialogs.
The macro or template name appears on the button face, replaced by "label"
if present.
The syntax for the execute button field corresponds closely to that of the
EXECUTE command. As such, "EXecute" can be used in place of "." before the
macro or subtemplate name; also, if EXIT is present, then "." is optional.
A repetition factor in parentheses can be specified for macro execution.
Any parameters following .name are passed to the named macro or subtemplate
to substitute for "%1", "%2", etc. (Note that these parameters may not begin
with "/" unless enclosed in quotes.)
If EXIT is present, the template dialog box exits instead of being restored
following execution of the named macro or subtemplate. If /START is present,
then the execution button has startup focus, triggered when Enter is pressed.
If /NOVERify is present, any invalid variable values are discarded before
execution, instead of popping up a warning box.
F. Exit Button Fields
["ok" ["cancel"]] EXIT
Exit buttons are added by default at the bottom of a template dialog box;
normally "OK" and "Cancel" buttons are added, but if the template contains
no variable, FILE, or DIR fields, then the "Cancel" button is suppressed.
However, if any explicit EXIT buttons are present (including EXIT by itself),
then no default "OK" or "Cancel" buttons appear.
If EXIT is preceded by a single "ok" label, this renames the "OK" button and
the "Cancel" button is omitted. If EXIT includes both "ok" and "cancel"
labels, then these labels rename the corresponding buttons.
V. Keyboard Shortcuts For Template Buttons
The first capitalized letter in a button field label is underlined and acts
as a keyboard shortcut when not editing a variable field, or any time if used
together with the Alt key. To specify a different label character as the
shortcut, precede that character with an underline ("_"). To prevent any
character from being an underlined shortcut, end the label with "_". A
doubled underline "__" causes single non-shortcut "_" to appear in a label.
"OK" and "Cancel" buttons do not have automatic underlined keyboard shortcuts
unless "_" is explicitly used; note Esc is always a shortcut for "Cancel".
VI. Template Startup Focus
If an "OK" button is present in a TEMPLATE, it is highlighted as the starting
button triggered when Enter is pressed; this input focus button can be moved
forward or back by pressing Tab or Shift-Tab. If there is no "OK" button, the
first button field is the starting button. A different starting button can
be specified by including the /START parameter after a button field. If any
variable fields exist, the first variable field begins with the keyboard focus
for data entry, and the starting button is triggered if Enter is pressed.
VII. Template Verification
All variable, FILE, and DIR fields in a template are verified to check that
they contain valid input values before storing them into their associated
variables. (For example, if a variable was defined using the "VARIABLE X:2:3"
command, then any value less than 2 or greater than 3 would be invalid.)
If a field is invalid, then a warning box pops up explaining the problem, and
the dialog box resumes with focus on the invalid field.
Verification takes places before a template dialog exits or executes a macro
or subtemplate. Verification may be turned off for a particular button by
including the "/NOVERify" parameter, which discards any invalid values.
VIII. Template Exit Status
The TEMPLOK system variable stores the ordinal number of the field button
which was pressed to exit the most recent template dialog box, or else it
stores 0 if "Cancel" or the dialog title bar close button was pressed.
(For example, if a template contains a text tag, a variable field, "OK", and
"Cancel", pressing "OK" would set TEMPLOK to 3.) Normally this variable would
just be checked for non-zero to make sure the dialog wasn't cancelled, but
when multiple EXIT buttons are present, TEMPLOK could be used to determine
which EXIT button was selected by the user.
TC
TC /NOSURF /FSM omits the GM values but still shows FSM (formerly it omitted
FSM also).
VARIABLES
REACT, LCR, TCR, and VCR real system variables were added to return the ground
reaction force and center of ground reaction. They are all undefined if there
are no ground points, and the center is undefined if REACT is zero.
FLDHT real system variable was added to return the height of the lowest
flooding or tight point at the present waterplane, or undefined if none.
V and VARI abbreviate the VARIABLE command; note VAR still abbreviates VARY.
MP - Mid Perpendicular location
FREEBD0 real system variable was added to return the freeboard to the deck
edge, differing from FREEBD which respects the margin if any.
Error variable enhancements:
SET ERROR= 0 (normal mode, if an error occurs it reports error and stops)
SET ERROR=-1 (reports error and continues without waiting)
SET ERROR=-2 (reports error and waits before continuing)
SET ERROR=-999 (continues without reporting error or waiting)
GMT and GMTRA real system variables were added to return the transverse
metacentric height derived using waterplane and righting arm, respectively.
TMMT real system variable was added to return the trimming moment.
MBSTATE and MBTIME real system variables were added to return the current
MultiBody status (-2=not yet in equilibrium; -1=no other vessels connected;
0=MB inactive; 1=all vessels in mutual equilibrium) and number of seconds
it took to solve to MB equilibrium since any changes were last made. These
variables can be used in conjunction with the SOLVE WAIT:seconds /SUSPEND
command to detect MB stages that are slow to come to equilibrium, thereby
enabling MB run files to gracefully continue past such stages.
WRITE
A new form of WRITE, WRITE (MAXVCG), writes only the max VCG data. /APPEND
does not apply in this case and a filename must be supplied.
SAVE now omits the PROJECT command if a file specification is given.
Wildcard characters are now allowed in the name specification of
WRITE(MACRO).
A new WRITE category of VARIABLES is now available which writes only variable
declarations and values. Like WRITE (MACRO), the /NAME and /APPEND parameters
can be used.
======= Minor New Features =======
SE, ENTER PM, DISPLAY STATUS, etc. now execute auxiliary programs directly,
instead of via a DOS prompt, thereby circumventing certain system-specific
problems.
Now respects the location of the Windows taskbar and any application
desktop toolbars when maximizing.
Displays a profile graph of the current vessel geometry as a watermark
behind the command line area, highlighting any tanks selected by PART or TANK.
SCREEN NOGRAPH turns off this vessel graph (restoring the clear background
from previous versions), while SCREEN GRAPH turns this vessel graph back on.
Now uses long filenames instead of short filename equivalents
everywhere except for geometry file names and GHS program directory
(which continue to need short filenames for compatibility with remaining
DOS helper programs such as SE and PM). The current report name is
displayed on the GHS32 footer line in long filename format if it does not
exceed 12 characters, else with any final ".PF" omitted if that does not
exceed 12 characters, else in short filename format. (VIEW command for
long filenames requires updated GHSVIEW.EXE.)
Starting window size was increased from 25 to 50 rows (subject to
screen size limitations).
GHS border and reverse video color now matches the Windows menu bar color
(if no darker than dark grey).
======= Bug Fixes =======
GHS was failing to start using paths exceeding 80 characters (the limit is
now 255 characters).
PART commands in save files that refer to missing parts no longer trap the
error "No such part"; instead, GHS displays "Warning: PARTNAME does not exist"
and waits for a space.
GHS displays any GHS.BMP bitmap present in the GHS program directory as a
centered splash image at startup; this image is cleared by READ or CLS.
The splash image is suppressed if there is any initial run or library file
processing during GHS32 startup.
Maximum window width is no longer limited to 1280 pixels, so the
program window can now be resized to mostly cover very large display monitors.
COPY, REN, and ERASE commands permit quoted parameters (needed for safe
handling of long file names).
Previous Version Update Features
Copyright (C) 2008
Creative Systems, Inc.