User Tools

Site Tools


library

This is an old revision of the document!


Library

The module library is an integrated “database” for sub-system modules. Any sub-system can be added to the library, so that it can be re-used later on in other projects.

Modules are organized in the library in a normal file structure with folders and files.

Manage library

To manage the library, select go to FileLibraryManage library.

The Manage library window lets user specify folder which contains Ecolego projects (with sub-systems) and navigate the library hierarchy, create, rename or delete folders. It also lets you import or export the library files *.ecl. Once a module is selected, information about it will be displayed in the fields to the right. With Manage library window user can change project or module information, change names, descriptions and images.

  • Select library folder - Select a folder with Select library folder button. List of modules is initially empty, until folder which contains projects (*.eco) is specified or library files have been imported to the library. To add new folder, right-click in this list and select New, to remove folder with all content right-click on it and select Delete;
  • Import - Import a new library from a *.ecl file;
  • Export - Export the currently selected projects or folders to a *.ecl file;
  • Name - Give a name for your module or change existing name. If the name is the same as a module in the same folder, that module will be overwritten;
  • Image - Click to select an image for the module. The image will be displayed in the library list.
  • Description - Enter a description for the module. It is recommended that the description includes the following information:
    • Overview - A brief description of what the module is for;
    • Context - A comment on which cases, or in which context, the module is suitable for. For instance, details on what materials it supports.

Creating a library file *.ecl*

After creating number of sub-systems in a Ecolego project (*.eco), or several projects with sub-systems there might be a need to pack them in a library *.ecl file, and send to other users, or save them for later use. To create a library file, user has to:

  1. Open Ecolego;
  2. Go to File → Library → Manage library;
  3. Press Select Library Folder button and specify folder with projects that should be packed in the library *ecl file;
  4. Mark the the projects (that contains sub-systems) or folders with projects that should be extracted as library using ctrl or shirt keys on the keyboard;
  5. Click on Export button;
  6. Add the name to the library (for example MyFirstLibrary.ecl).

This file can be later imported as a library with the same “Manage library” window, with the button named Import. Please pay attention if you will try to import same projects to the same folder they were extracted from, you will get error because of same names conflict.

Retrieving sub-systems from the library

From the Projects window:

  • Right-click the Blocks tab in the project tree and select LibraryGet from library from the pop-up menu.

From the Model window:

  • Right-click an empty cell in the matrix and select Get from library from the pop-up menu.
  • Right-click an empty place in the graph and select Get from library from the pop-up menu.

Select sub-system module which need to be inserted in the project. Then click Ok to add it. Please note that this “Library” window is similar to the “Manage Library Window” but doesn't allow user to change names, descriptions and images.

Caution! When adding a module from the library to a project that already contains modules, Ecolego will search for input/output names in the new module that matches the input/output names of the existing modules. If matches are found, the user will be prompted if he wants to automatically connect these. This is only recommended for users that are familiar with the library modules - mistakes are easily made unless the module library is carefully constructed.

Adding sub-systems to the library

From the Projects window:

  • Right-click the sub-system in the project tree and select Add to library from the popup menu.

From the Model window:

  • Right-click the sub-system in the matrix and select Add to library from the popup menu.
  • Right-click the sub-system in the graph and select Add to library from the popup menu.

Note that the sub-system must be “collapsed”.

Replace sub-system with the library item

There is possibility to replace one sub-system module with other one from the library. To replace sub-system module, user has to:

  1. Select sub-system module in the matrix or graph model window;
  2. Right click on it and select in popup menu Replace with library item… button;
  3. Chose which sub-system module should be placed instead of selected;
  4. Press Ok;
  5. Retain Values window will show list of parameters and lookup tables which were added or removed during replacement;
  6. Press Ok.

Synchronize with the library

Libraries are used to build models. Changes can later occur to either the models (where the user might want to go back to the initial values from the library), or a change can occur to the source library (in which case, the user might want to update the models with the new library values). Either way, the model should be synchronized with the source library. To do this action:

  1. First make sure that the proper library folder is selected (see Manage library)
  2. Go to File / library / Synchronize with library
  3. Select the subsystems that should be updated with the library

See also

library.1647614095.txt.gz · Last modified: 2022/03/18 15:34 by mina