Difference between revisions of "Filed modules and libraries"

Line 1: Line 1:
 
[[Category:Analytica User Guide]]
 
[[Category:Analytica User Guide]]
[[Analytica User Guide]] > [[Working with Large Models]] > [[Using filed modules and libraries]]
+
<breadcrumbs>Analytica User Guide > Working with Large Models > {{PAGENAME}}</breadcrumbs>
 +
 
  
 
Modules and libraries can be components of a model. If you are building several similar models,
 
Modules and libraries can be components of a model. If you are building several similar models,
Line 7: Line 8:
 
libraries.) To use a module or library in more than one model, create a '''''filed module''''' or '''''filed library'''''.
 
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''':
+
=== Creating a filed module or library ===
 
To create 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 a module by dragging the module icon from the node palette onto the diagram, and give it a title.
Line 15: Line 16:
 
#  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.
 
#  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:
+
=== 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.
 
#  Close the filed module or library, or close Analytica.
 
#  In Windows Explorer, select the filed module or library.
 
#  In Windows Explorer, select the filed module or library.
Line 22: Line 24:
 
# Close the '''Properties''' window
 
# 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 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.
+
=== 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
 
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 <code>/Lumina Decision Systems/Analytica/
 
directory is determined by a registry setting in <code>/Lumina Decision Systems/Analytica/
 
3.0/AddLibraryDir</code>, which is set by the Analytica installer to <code>INSTALLDIR/Libraries</code>.
 
3.0/AddLibraryDir</code>, which is set by the Analytica installer to <code>INSTALLDIR/Libraries</code>.
 
   
 
   
'''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.
+
=== 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.
+
=== 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.
  
==See Also==
+
== See Also ==
 
{| style="margin: 1em auto 1em auto;width: 100%;border:0;table-layout: fixed;" cellpadding=5
 
{| style="margin: 1em auto 1em auto;width: 100%;border:0;table-layout: fixed;" cellpadding=5
 
|- style="text-align: center"
 
|- style="text-align: center"
| [[Invalid variables]] <- || [[Using filed modules and libraries]] || -> [[Adding a module or library]]
+
| <footer>Invalid variables / {{PAGENAME}} / Adding a module or library</footer>
 
|}
 
|}

Revision as of 19:49, 26 October 2015


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:

  1. Create a module by dragging the module icon from the node palette onto the diagram, and give it a title.
  2. Create functions and variables in the module, or create them elsewhere and move them into the module.
  3. Change the class of the module to Module Chapter19 14.png or Library Chapter19 15.png
  4. The Save As dialog appears. Give the filed module or library a name and save it.
  5. 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:

  1. Close the filed module or library, or close Analytica.
  2. In Windows Explorer, select the filed module or library.
  3. Select Properties from the File menu. Chapter19 16.png
  4. Check the Read-only checkbox.
  5. 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.

See Also

Comments


You are not allowed to post comments.