Difference between revisions of "Configuring Personalized Defaults"

 
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
When you start Analytica with a new model, numerous defaults are in effect.  You can change these and save new settings with your model file, but these do not apply to new models.  This page describes how the initial defaults used by Analytica can be customized for your own personal use.  For example, if you like results to open in table view, rather than graph view, by default, this can be configured.  Or if you like graph fonts to auto-scale when you change the size of the window, you can set this up.
+
[[Category: Concepts]]
  
When you configure personlized settings, these defaults are ''not'' stored with your models.  This means that users of your model will experience Analytica's standard defaults (except where settings have been stored explicitly).  In general, whenever a setting, such as a [[Preferences | preference]], is reset to your personalized default, the setting does not get stored with your model.
+
__TOC__
  
= Configuring a personalized defaults file =
+
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.
  
Analytica reads many of its defaults from a file called Analytica.ini, found in the directory where you installed Analytica.  You can examine this file (using a text editor) for an idea of what a preference file looks like.  The preference file consists of typescript, and setting personalized preferences really amounts to writing typescript to set desired system variables.
+
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).  
  
We recommend that you do NOT change the Analytica.ini file directly.  Doing so would cause you to lose your settings whenever you upgraded to a new Analytica release.  Instead, follow these steps to set up a personalized preference file:
+
== Configuring a personalized defaults file ==
 +
 
 +
Analytica gets most of its system defaults from a file called <code>Analytica.ini</code>, 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 <code>Analytica.ini</code> file directly.  If you do, you will lose your changes whenever you upgrade to a new Analytica release.  Instead, create a personalized preference file:
  
 
* Start a text editor (such as Notepad or Textpad).
 
* Start a text editor (such as Notepad or Textpad).
* Enter some typescript to specify your desired defaults (more on this below).  As a starting point, try entering:
+
* Enter typescript commands to set your desired defaults (more on this below).  As a starting point, try entering:
Usetable := 0
+
*:<code>Usetable := 0</code>
(this will cause results to open as tables by default)
+
*:(this will cause results to open as tables by default)
* Save this file at a known location with a known name. Remember the full file path.  For example, you might save it in [My Documents] as MyAnaPrefs.ini.  The full file path might would then be:
+
* Save this file and remember its full file path and name.  For example, you might save it in <code>My Documents</code> as <code>MyAnaPrefs.ini</code>.  The full file path might would then be:
C:\Documents and Settings\''LoginName''\My Documents\MyAnaPrefs.ini
+
*:<code>C:\Documents and Settings\''LoginName''\My Documents\MyAnaPrefs.ini</code>
where ''LoginName'' is replaced with your Windows user name.
+
*:where ''LoginName'' is replaced with your Windows user name.
 
* Run RegEdit.exe and navigate to:
 
* Run RegEdit.exe and navigate to:
  HKEY_CURRENT_USER\Software\Lumina Decision System\Analytica
+
*:<code>HKEY_CURRENT_USER\Software\Lumina Decision System\Analytica</code>
* From the menu, select '''Edit&rarr;New&rarr;String Value'''
+
* From the menu, select [[Edit menu|Edit]] &rarr; '''New &rarr; String Value'''
 
* Rename the value to ''Preferences''
 
* 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.
+
* 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.  You will want to take care to avoid errors in this file -- it loads while Analytica is starting up, but Analytica may not be particularly friendly at reporting errors in this file.
+
Now you have set up a personalized preference file.  If you want to alter your preferences, you simply need to edit the <code>MyAnaPrefs.ini</code> 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.
  
= Specifying Preference Settings =
+
== Specifying your personalized defaults ==
  
 
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.
 
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:
 
Some examples:
Usetable : 0      { Default result view = Table }
+
:<code>Usetable: 0      { Default result view = Table }</code>
Usetable : 1      { Default result view = Graph -- Analytica's default }
+
:<code>Usetable: 1      { Default result view = Graph -- Analytica's default }</code>
  
Windows : 2      { Windows of each kind = any number }
+
:<code>Windows: 2      { Windows of each kind = any number }</code>
Graphwindows : 9  { Up to 9 result windows }
+
:<code>Graphwindows: 9  { Up to 9 result windows }</code>
  
Showdescriptionmarks : 1  { Flag nodes with descriptions }
+
:<code>Showdescriptionmarks: 1  { Flag nodes with descriptions }</code>
  
Graph_adaptfontsize:1  { Adapt displayed font size to graph height }
+
:<code>Graph_adaptfontsize: 1  { Adapt displayed font size to graph height }</code>
  
= Infering a preference setting =
+
== 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. 
  
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:
 +
:<code>AutosaveFilename</code>
 +
 
 +
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 <code>preference.ini</code> file.  This technique gives you a way to find almost any preference that you might like to customize.
  
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:
+
== See Also ==
AutosaveFilename
+
* [[Preferences]]
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.
+
* [[Preferences dialog]]
 +
* [[Analytica Registry Settings]]

Latest revision as of 23:34, 24 May 2016


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:

  • Start a text editor (such as Notepad or Textpad).
  • 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
    where LoginName is replaced with your Windows user name.
  • 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.

Specifying your personalized defaults

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.

See Also

Comments


You are not allowed to post comments.