Title

elfs instance -- Settings for concurrent Stata instances

Description

These settings are used to assign a unique ID to the each running instance of Stata, and to load preferences based on that ID.

The main purpose of giving each instance an ID is to track all settings and ancillary files independently for each instance -- especially the current and recent data-sources and paths.
Without setting an ID, the most recently used file in any instance becomes the most recent for all instances.

Fields

precedence is the order in which to assign the ids & settings to the instances. That is, when you launch Stata, if the ID for precedence 1 is not in use, it will be assigned to the new instance.
If it is already in use, precdence 2 will be checked, etc.

ID is the ID assigned to the instance; it is included in the main window title, by default (as described in elfs misc).

Preference Set Name is the name of a Stata Preference Set to load when the relevant ID is assigned. A Preference Set with that name must have already been saved, ie: Edit->Preferences->Save Preference Set.

Links

Edit All opens a data editor with all the settings. After editing, be sure to use the save link.

Delete deletes a user-created setting.

In order for these settings to have any effect, you must use elfs startup to set instance to on.

Remarks

Because of the way the IDs are assigned in order, you can create setups that are always initiated for your first or second instance, etc. For example, if you:

1) save a preference set named instance_1 with window positions on the left side of the monitor, and standard colors

2) save a preference set named instance_2 with window positions on the right side of the monitor, and alternate colors

3) use elfs startup to set instance to on

then, when you launch Stata the first time, it will show up on the left with standard colors, and if you launch a second copy, it will show up on the right with alternate colors.

Furthermore, if you closed the first one and relaunched stata, you'd get a new first: on the left, standard colors, recent files etc. of the first instance.
Same with closing the second and relaunching.

elfs colors includes color sets that could be used to distinguish up to three instances.