Saving and Restoring Units Settings

Top  Previous  Next

 

RESET

If this keyword appears anywhere in a #Units directive line, the effect is to set all parameters (including the current name prefix) to their defaults before the other arguments are processed.  You may occasionally want to use RESET to clear any compile options in the project script (or earlier in the file itself) so you can be sure of starting afresh. RESET does not affect the current segment attribute being assigned to vectors.

 

SAVE / RESTORE

If the keyword "SAVE" appears on a #Units directive, then all of the parameter values (units, corrections, declination, name prefix, etc.) which were in effect prior to the directive are saved on a "stack" before any of the other #Units arguments, which could change those settings, are processed.  Then, further along in the file, the RESTORE keyword can be used to put things back the way they were before the SAVE.  (As many as 10 successive saves can be restored.)

 

SAVE/RESTORE is convenient when assigning attributes to a few data lines while not affecting the processing of lines above and below. Here is an example:

...

#Units Save Reset Feet Tape=SS

A10        A11        60        323        -30        3        1.5

A11        A12        45.5        280        -15        3        1.5

#Units Restore

...

 

Without the "Reset" keyword, all settings except those changed with "Feet Tape=SS" would remain unchanged during the processing of the two lines. In this example, however, the other parameters are reset to the program's defaults. (When present on the same directive, the Save and Reset keywords should appear in the order shown.  The positioning of the other #Units arguments is unimportant.)