Re-Ordering Variables with a text editor


[This topic contains detailed instructions. You might like to print it out (right-click on the text)].

The Format Menu offers a way to hide or re-order variables, but it might be a little tedious if you had to reorder many variables.

This order is stored between sessions in a text format file. You could edit such a file manually if you chose.

To try this, use the Format Menu to save the current ordering as, say, MyOrder.FMT.

Then open MyOrder.FMT in TABmate. You might see something like:

0 HideZeroVars

0 VectorOption

5 NDec

afcom 10 1

afall 10 1

af 10 1

afreg 10 1

........ and so on

Ignore the first 3 lines, which store general formatting options.

Next follows one line for any variable which appeared in any solution file you read recently. Each line consists a variable name followed by 2 integers.

If you reorder those lines, you re-order the ViewSOL display. Try this (eg, exchange last and first variables). Then from TABmate save MyOrder.FMT.

Then from ViewSOL's Format menu, load MyOrder.FMT. You should see that the variable order in the Contents window has changed.

Now close ViewSOL. This will save the new ordering in the default format file DEFAULT.FMT. Now reopen the solution file in ViewSOL. DEFAULT.FMT will be loaded and the new ordering will apply without further intervention by you.

The two integers on each variable line are

the reference count (explained below, and managed by ViewSOL); and

a visibility flag: 1 for visible, or 0 for hidden

Fine print: the reference count

The variables listed in the FMT file comprise every variable that appeared in any solution file you read recently. Variables in the FMT file that are not present in open SL4 files are ignored, for now, but not forever forgotten. However, the FMT file might get too large, if it stored details for every variable in any SL4 that you ever examined. The reference count addresses this problem. It is a number between 1 and 10.

When an SL4 file is opened, each variable appearing in that SL4 file has its reference count increased by 1, up to a maximum of 10. If an SL4 variable does not appear in the FMT list, it is added at the end (ie, ordered last) with reference count 0.

When the FMT file is saved, any variables not used this session have their reference count reduced by 1. If the result is 0, that variable is not saved to the FMT file.

The effect is that if you add a variable to your model, ViewSOL will put it last in the display order, and if you delete a variable from your model, ViewSOL will eventually forget about it.



URL of this topic: www.copsmodels.com/webhelp/viewsol/hc_reordertext.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage