# Configuring Personalized Defaults

Analytica starts a new model with numerous default settings. You can change these defaults using the Preferences dialog (from Edit menu). This will change the settings for this model, saved in your model file, but they won't apply to new models. Here we explain how to customize the initial defaults used by Analytica for your own use. For example, if you like results to open in a table view by default rather than graph view -- or if you like graph fonts to auto-scale when you change the size of the window, you can change the defaults that apply to each new model you create.

These personalized settings are not stored with your models. This means that users of your model will get Analytica's standard defaults (or their own personalized settings if they have changed them).

## Configuring a personalized defaults file

Analytica gets most of its system defaults from a file called Analytica.ini, found in the directory where you installed Analytica. Analytica loads this file automatically before loading a model. You can examine this file using a text editor) for an idea of what a preference file looks like. It is a sequence of typescript commands. Setting personalized preferences really amounts to writing typescript to set desired system variables.

We advise you not to change the Analytica.ini file directly. If you do, you will lose your changes whenever you upgrade to a new Analytica release. Instead, create a personalized preference file:

• Enter typescript commands to set your desired defaults (more on this below). As a starting point, try entering:
Usetable := 0
(this will cause results to open as tables by default)
• Save this file and remember its full file path and name. For example, you might save it in My Documents as MyAnaPrefs.ini. The full file path might would then be:
C:\Documents and Settings\LoginName\My Documents\MyAnaPrefs.ini
• Run RegEdit.exe and navigate to:
HKEY_CURRENT_USER\Software\Lumina Decision System\Analytica
• From the menu, select EditNew → String Value
• Rename the value to Preferences
• Double click on the name (new Preferences) and in the Value data box, type the full file path name to your preference file.

Now you have set up a personalized preference file. If you want to alter your preferences, you simply need to edit the MyAnaPrefs.ini file from a text editor. Take care to avoid errors in this file -- it loads while Analytica is starting up, the error messages may not be particularly helpful.

The trick to specifying your own preferences is in knowing what system variables to set, and to what value. Much of this documentation can be found on this Wiki.

Some examples:

Usetable: 0 { Default result view = Table }
Usetable: 1 { Default result view = Graph -- Analytica's default }
Windows: 2 { Windows of each kind = any number }
Graphwindows: 9 { Up to 9 result windows }
Showdescriptionmarks: 1 { Flag nodes with descriptions }
Graph_adaptfontsize: 1 { Adapt displayed font size to graph height }

## Inferring a preference setting

If you know how to set a preference or global default using the Analytica user interface, it is fairy easy to figure out what the corresponding typescript is that would go in your startup preference file.

One way to figure this out is to examine the autosave recovery file before and after you make the change. First, from the Preferences dialog on the Edit menu, ensure that "Maintain recovery info" is checked. Then ensure that you have made at least one change to your model (so that the recovery file is started). To find the recovery file, type Ctrl+F12 to enter the typescript window, and type:

AutosaveFilename

This will display the full path to the file used to log changes you've made since the last time you've saved your model. Now, set the preference you are interested in (make sure that this causes a change in the preference), press and use Set Default to close the dialog (if appropriate). Now, load the autosave file into a text editor and examine the last line or two. You should spot the preference listed there, in exactly the syntax expected by your preference.ini file. This technique gives you a way to find almost any preference that you might like to customize.