General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)


It is no secret that the flagship GHS geometry module known as Part Maker resides in an environment that is richer than what the documentation indicates.

When the PM rewrite came out several years ago, the focus was on making it fully compatible with the original program in order that old PM run files would work as before. So the new features inherent in GHSX products were not advertised at that time.

Even today little attention is given to features that go beyond the original set of PM commands, which is why we say (in a whimsical way) that some things about PM are secret (though the secrets belong to the environment in which PM resides, not the essential Part Maker itself).

To achieve compatibility with the old Part Maker, the tighter syntax rules of the GHSX environment had to be relaxed and some new features excluded. PMX is now considered the extended version of PM, where new syntax rules apply and all features are available. Some of the "Part Maker extensions" are documented at

Yet there are things lurking in the PM environment that are not documented anywhere. One of these is the RECOVER command, which provides for error recovery.

The GHS main program offers the ERROR system variable and the ESC macro for responding to input errors. In Part Maker the RECOVER command can be used to direct the program to execute a particular macro in case of an input error.

RECOVER macname

The RECOVER command can be issued anywhere in the PM run file, and it can appear more than once. The only restriction is that the named macro exist. Example:

  message Type QUIT to exit Part Maker.

Another error-handling technique is to suppress a potential error from halting the program. In the GHS main program this is commonly done by setting the ERROR variable to -4. For example,


(This is slightly easier than checking for the existence of the file first and not doing the ERASE command if the file does not exist.)

In the Part Maker environment the same thing is done quite simply by the ERROR IGNORE command, which causes any error in the next command to be ignored:


Why does the Part Maker environment harbor secrets? The only excuse we have is that GHSX is still under development. Someday it will be more fully documented. Until then, its secrets will be known only to COW readers.

Questions, comments, or requests?
Contact Creative Systems, Inc.

USA phone: 360-385-6212 Fax: 360-385-6213
Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday

Mailing address:
PO Box 1910
Port Townsend, WA 98368 USA

Click here for an index to this and previous COWs