Difference between revisions of "User Libraries"

m
Line 4: Line 4:
 
When you place functions and variables in a library, the library becomes available as an extension to the system libraries. Its functions and variables also become available.
 
When you place functions and variables in a library, the library becomes available as an extension to the system libraries. Its functions and variables also become available.
  
There are two types of user libraries (see also “To change the class of an object” on page 53):
+
There are two types of user libraries):
* A library is a module within the current model.
+
* A library [[File:library_icon1.png]] is a module within the current model.
* A filed library is saved in a separate file, and can be shared among several models.
+
* A filed library [[File:library_icon2.png]] is saved in a separate file, and can be shared among several models.<br />
 +
 
  
 
==Creating a library==
 
==Creating a library==
Line 13: Line 14:
  
 
# 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.
# Change the class (page 53) of the module to library or filed library.
+
# ''Change the class'' of the module to library or filed library.
# Create functions and/or variables in the new library or create them elsewhere in the model and then move them into the library.
+
# Create functions and/or variables in the new library or create them elsewhere in the model and then move them into the library.<br />
 +
 
  
Functions and variables in the top level of the library can be accessed from the Definition menu or Object Finder. Use modules within the library to hold functions and variables (such as test cases) that are not accessible to models using the library.
+
Functions and variables in the top level of the library can be accessed from the '''Definition''' menu or '''Object Finder'''. Use modules within the library to hold functions and variables (such as test cases) that are not accessible to models using the library.
  
 
==Adding a filed library to a model==
 
==Adding a filed library to a model==
  
Add a filed library to a model using the Add Module dialog.
+
Add a filed library to a model using the '''Add Module dialog'''.
  
 
==Using a library==
 
==Using a library==
Line 26: Line 28:
 
When defining a variable, you can use a function or variable from a library in any of the following ways:
 
When defining a variable, you can use a function or variable from a library in any of the following ways:
 
* Type it in.
 
* Type it in.
* Select Paste Identifier from the Definition menu to open the Object Finder.
+
* Select '''Paste Identifier''' from the '''Definition''' menu to open the '''Object Finder'''.
* Select Other from the expr menu to open the Object Finder.
+
* Select '''Other''' from the '''''expr''''' menu to open the '''Object Finder'''.
* Paste from the library under the Definition menu.
+
* Paste from the library under the '''Definition''' menu.<br />
 +
 
  
[[File:library_1.png|300px]]
+
::[[File:library_1.png|300px]]
  
 
===Example===
 
===Example===
Line 37: Line 40:
  
 
::[[File:library_2.png|400px]]
 
::[[File:library_2.png|400px]]
 +
 +
== See Also ==
 +
[http://wiki.analytica.com/index.php?title=Change_class_of_an_object Change class of an object]
  
  
 
<footer>Parameter qualifiers / {{PAGENAME}} / Procedural Programming</footer>
 
<footer>Parameter qualifiers / {{PAGENAME}} / Procedural Programming</footer>

Revision as of 18:33, 26 December 2015


When you place functions and variables in a library, the library becomes available as an extension to the system libraries. Its functions and variables also become available.

There are two types of user libraries):

  • A library Library icon1.png is a module within the current model.
  • A filed library Library icon2.png is saved in a separate file, and can be shared among several models.


Creating a library

To create a library of functions and/or variables:

  1. Create a module by dragging the module icon from the node palette onto the diagram, and give it a title.
  2. Change the class of the module to library or filed library.
  3. Create functions and/or variables in the new library or create them elsewhere in the model and then move them into the library.


Functions and variables in the top level of the library can be accessed from the Definition menu or Object Finder. Use modules within the library to hold functions and variables (such as test cases) that are not accessible to models using the library.

Adding a filed library to a model

Add a filed library to a model using the Add Module dialog.

Using a library

When defining a variable, you can use a function or variable from a library in any of the following ways:

  • Type it in.
  • Select Paste Identifier from the Definition menu to open the Object Finder.
  • Select Other from the expr menu to open the Object Finder.
  • Paste from the library under the Definition menu.


Library 1.png

Example

Compare the way the Capm() function is displayed in the Object window (see Libraries) to the way it is displayed in the Object Finder.

Library 2.png

See Also

Change class of an object


Comments


You are not allowed to post comments.