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


Since everything that comes out of GHS depends on the ship's geometric modeling, it is important that the Geometry File on which the calculations are based can be positively identified. It is not unusual to have several Geometry Files pertaining to the same ship—perhaps reflecting stages of development and corrections or modifications of the physical vessel.

COW #043 featured the COMMENT GFID command, which displays the path to the Geometry File and the date and time at which the file was created or modified. This is very handy, but it does not display comments that may be in the Geometry File that would help to identify its origin and history.

Furthermore, when it comes time to make changes in the Run File that created the Geometry File, you want to be sure that you have the right Run File. The dates of creation and modification that are attached to a file are not necessarily reliable for this purpose: the original dates will be lost if the file is edited and saved under a different name.

The COMMENT command in Part Maker can be used to address this problem. It adds your comments to the Geometry File. Whatever comments you have put in the Geometry File are then displayed by the companion COMMENTS command in the GHS main program.

It may be useful to include the date on which the Geometry File was written. Since this will not change in subsequent editing, it remains as a link to the Run File by which it was created (assuming that Run File has not changed in the meantime). A comment including the current date and time can be conveniently added by making use of the DATE and TIME system variables. For example,

COMMENT >> The Geometry File was written by Part Maker on {DATE} {TIME} <<

When GHS encounters this command during its pre-processing of the Part Maker section of your Run file, it substitutes the present date and time. So it should be placed near the end, just before the Geometry File is written.

Subsequently, after the Geometry File has been read in the GHS main program, the COMMENTS command will place the comments from the Geometry File into the report. The image above is the top of the first page of a report where that was done. Click here to see the Run File that made it.

Depending on how you run Part Maker, there are some variations on this to consider. If GHS is not pre-processing the Part Maker commands, you will have to get the date and time from Part Maker system variables. This is a new feature that first appeared in PMX 15.98A.

This version works with ENTER PMX /DIRECT:
 macro timestamp
  COMMENT The geometry file was updated %1  %2
.timestamp DATE, TIME
This version works with ENTER PM or ENTER PMX:
 macro timestamp
  COMMENT The geometry file was updated %1  %2
 .timestamp {DATE}, {TIME}
This is the universal version that works in all of the above cases:
 macro timestamp
  COMMENT The geometry file was updated %1  %2%3%4%5%6%7
 .timestamp {DATE}, {TIME}
Note that only with ENTER PM /DIRECT are you cut off from access to the DATE and TIME. If you want to make use of the new DATE and TIME variables in Part Maker, you have to get the new PMX version.

Someone suggested that PM be retired and replaced with PMX. The reason we hesitate to retire PM is that the syntax of PMX commands demands more punctuation (which allows you to use variables in a more natural way), but those stringent syntax rules make it incompatible with some Run Files that use the relaxed syntax everyone is familiar with in GHS.

We will press on in the new year, but we will never forget the old.

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