General HydroStatics
Ship Stability Software |
Command of the Week
(New or interesting aspects of GHS that you may not know about) |
DISPLAY WEIGHT ITEMS!
|
John Bonn called to complain about the weight-display macro featured in last
week's COW. The drawback with it, he said, is that it doesn't identify the
"blobs" in the display, and since sometimes they overlap it's hard to be
sure what you're looking at.
So for John's benefit we made the macro shown below, which gives him a menu of his weight items and allows him to select any or all of them. (The weight items shown in the sample below are not John's; they're the same ones we used last week.) |
MACRO DISPLAY_SOME_WTS MACRO D1E "{S%%91}" check C%%91 // TEMPLATE D1 "Weight Item Locations" /nokey EXPAND D1E ({N},1) 2 BREAK "DISPLAY" .DISPLAY_WTS ".SKIP"|, "Select all" .SEL ({N},1) 1, 1 |, "Deselect all" .SEL ({N},1) 1, 0 EXIT // MACRO SKIP IF {C{I}}=0 THEN EXIT | EXIT T // MACRO SEL SET J=%%91 PLUS 1 SET C{J}=%%92 // VARIABLE J MACRO N1 SET N={N} PLUS 1 ADD ({N}) S /ACCESS IF "{S}"="" THEN EXIT VARIABLE (STR) S{N}="{S}" VARIABLE C{N}=1 EXIT N1 // VARIABLE (STR) S VARIABLE N=1 .N1 SET N={N} MINUS 2 .D1 / .DISPLAY_SOME_WTS |
(In order to use this, include the macro from last week's COW.) |
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 |