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
To apply an Anastyle File to the current model, simply add it as a library like so:
- If you’re not in Edit Mode, enter Edit Mode by selecting the Edit Tool in the toolbar (keyboard shortcut F9).
- Go to File > Add Library…
- Select your desired Anastyle file from the Select Library File window and press Open.
- 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.
There are 4 built-in Anastyle files, which are shown below:
Classic | Pastel |
---|---|
Viridis | Plasma |
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
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}
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)' )
Enable comment auto-refresher