Category:Function libraries


You can package User-defined functions (UDFs) into libraries, which can then be re-used in other models. Libraries can be saved in their own files, enabling easy sharing between different models. When UDFs are packaged into a library, these functions are not available for use until you add the library to your model. You add libraries using either Add Module... (for your own libraries) or Add Library... (for the standard libraries that come with Analytica), both found on the File menu. The only difference between Add Module... and Add Library... is which directory the File selector dialog starts in. Add library... starts in the Analytica Libraries directory, making it convenient to find the libraries that are pre-installed with Analytica.

When you add a library. you have a choice between linking or embedding the library. If you don't plan on making changes to the library, then it doesn't make much difference, except that by linking you'll automatically get the updated version of the library if you or others make changes to it (e.g., while working on other models), and you'll get the latest version when you upgrade to the next release of Analytica. If you make changes to the library, your changes will immediately be seen by other models that have linked the library.

See Analytica Libraries and Templates for a comprehensive overview.