Anastyles

Anastyles are Analytica files that allow you to save system settings and apply them to other models. Analytica comes with built-in Anastyle files so you can easily apply Node Styles to your existing models, but Anastyles are not limited to node attributes and can be used to save and apply values for other system variables.

Apply an Anastyle

Tip
You cannot undo changes made by applying an Anastyle file, so make sure to save your model just before applying in case you want to revert the changes.

To apply an Anastyle File to the current model, simply add it as a library like so:

  1. If you’re not in Edit Mode, enter Edit Mode by selecting the Edit Tool in the toolbar (keyboard shortcut F9).
  2. Go to File > Add Library…
  3. Select your desired Anastyle file from the Select Library File window and press Open.
  4. Depending on what settings are saved in your Anastyle file, you may see a warning that you are importing a Model file that includes settings and preferences for some system variables and you will be asked whether you want to retain your current settings. Make sure to press No to import the settings from the Anastyle file.

Built-In Anastyles

The built-in Anastyles are stored in the Node Styles folder of the Libraries folder as highlighted in the image below. By default the Select Library File window should open in the Libraries folder. If not, this Libraries folder is usually accessible by going to C:/Program Files/Lumina/Analytica/Libraries.

SelectLibraryFileWindow.png

There are 4 built-in Anastyle files, which are shown below:

Classic

Classictheme.png

Pastel

PastelAnastyle.png

Viridis

ViridisAnastyle.png

Plasma

PlasmaAnastyle.png

Note that the built-in Anastyle files only alter Node colors. For more options, such as updating node borders and graph colors, see the Color Themes Library, which provides additional theme options and can generate Anastyle files.

See the Lumina Blog for insight on how the Viridis and Plasma themes were designed.

Creating Anastyles

Tip
Since Anastyles can alter System Variables and drastically alter models they are applied to, create and apply Anastyle files at your own risk.

Anastyle files are plain text files with System Variables and Node attributes stored in them in Typescript. Anastyles generally start with a declaration of the file type (Analytica Model), encoding, and software version. This is then followed by Typescript  For example, the following code shows the first 6 lines of the Defaults.anastyle file:

{ Analytica Model default_anasty, encoding="UTF-8" }
SoftwareVersion 5.3.0
Nodecolor Variable:19661,48336,65535
Nodecolor Chance:19661,-1,-1
Nodecolor Decision:19661,65535,42597

Curly Brackets {} for Version Gated Comments

If you are including code that affects a newer attribute, you can put it in curly brackets with the release number so Analytica will treat the code as a version gated comment. This makes it possible to read in code with newer features in older versions of Analytica without causing errors. The syntax for this is {!x| code} where x is the Analytica version number.

For example, the following code will not evaluate in versions of Analytica older than 6.3.000:

{!60300|_DynamicArrowColor of ArrowClass :0xff646464}

Tip
If you save a model file containing version gated comments in an older release of Analytica, those comments will not be saved. For example, if you applied an Anastyle containing the previous line of code into Analytica 6.2 and then saved your model file, when you open the model in Analytica 6.3 there will be no changes to _DynamicArrowColor of ArrowClass since the version gated comment would not be included in the saved version.

Parentheses () for Analytica Expressions

You can include include Analytica Expressions in an Anastyle if you surround them with parentheses. For example the following Typescript:

NodeColor Text :0,0,0

Could also be entered into an Anastlye as the following Analytica expression when placed in parentheses:

( NodeColor of Text := 'rgb(0,0,0)' )

See Also

Comments


You are not allowed to post comments.