Filed modules and libraries
Models and modules
Modules and libraries can be components of a model. If you are building several similar models, or if you are building a large model composed of similar components, you can create modules and libraries for reuse. (See Building Functions and Libraries for details about libraries.) To use a module or library in more than one model, create a filed module or filed library.
Creating a filed module or library
To create a filed module or library:
- Create a module by dragging the module icon from the node palette onto the diagram, and give it a title.
- Create functions and variables in the module, or create them elsewhere and move them into the module.
- Change the class of the module to Module
or Library
- The Save As dialog appears. Give the filed module or library a name and save it.
- If you want the original model to load the new filed module or library the next time it is opened, save the model using the Save command.
Locking a filed module or library
To prevent a filed module or library from being modified, lock it:
- Close the filed module or library, or close Analytica.
- In Windows Explorer, select the filed module or library.
- Select Properties from the File menu.
- Check the Read-only checkbox.
- Close the Properties window
Adding a module to a model
To add a filed module to the active model, use the Add Module dialog. You can either embed a copy of the module or link to the original of the filed module.
Adding library to a model
To add a filed library to the active model, use the Add Module dialog. You can either embed a copy of the library or link to the original of the filed library.
When you select Add Library from the File menu, the Open File dialog always opens up to fixed directory, regardless of the current directory settings or previous changes of directories. The
directory is determined by a registry setting in /Lumina Decision Systems/Analytica/
3.0/AddLibraryDir
, which is set by the Analytica installer to INSTALLDIR/Libraries
.
Removing a module or library from a model
To remove a filed module or library from a model, first select it. Then, select Cut or Clear from the Edit menu. An embedded copy is deleted; a linked original still exists as a separate file.
Saving changes
After you have linked to a filed module or library, the Save command saves every filed module and library that has changed, as well as the model containing them, in their corresponding files. The Save As and Save A Copy In commands save only the active (topmost window’s) model, filed module or filed library.
Enable comment auto-refresher