User Libraries

In user libraries, you can encapsulate a combination of modules which you need more than once and store this combination for later re-use.

You can define as many user libraries as you want. Each user library can contain as many user library elements as you want.

A user library element contains a specific combination of modules and links. After you create them, library elements are available in the library panel (tab User Library) and can be used like operators.

A user library element is pretty much the same as a hierarchical box (see 'Hierarchical Boxes'). The difference is that user library elements are stored in a (user-defined) user library and can be inserted into different designs and projects, just as operators from the operator libraries.

User Libraries with Elements in the Library Panel

Figure 122. User Libraries with Elements in the Library Panel


The instances of a user library element are independent from each other, that is, if you make changes to one of the instances, this has no impact on the other instances of the same user library element.

User libraries are saved as *.vl files. These files are not part of a particular project. Thus, they can also be used in other projects.

In the System Settings of VisualApplets, you can specify where you want the *.vl files to be stored on your system (see 'System Settings').

When you have inserted the instance of a user library element into a design, you do not need the *.vl file for loading the project or for building the applet (*.hap file).

Creating a New User Library

To create a new user library, proceed as follows:

  1. In the library panel, click the User Library tab.

  2. Right-click in the user library window.

  3. From the context menu, select Create New User Library.

    (Alternatively, you can also use the main menu LibraryCreate New User Library.)

  4. Give a name to your new user library and click OK.

Now, an empty user library (functioning like a container) has been created which you can fill now with your user library elements.

Creating a User Library Element

There are two ways to create a new user library element. You can either

Saving a Hierarchical Box as a User Library Element

  1. Right-click on a hierarchical box to open the context menu of the module.

  2. Select Save to User Library.

    A Save dialog pops up:

    Saving a Hierarchical Box as a User Library Element

    Figure 123. Saving a Hierarchical Box as a User Library Element


  3. Select the user library you want to save the new element in (or, alternatively, click on New User Library and define a new library).

  4. Enter a name (under Element Type) for your new user library element.

  5. Optionally: If you want to add information on your element (version number, short description, individual GUI Icon, documentation in form of HTML help files):

    1. Click on Details. A new dialog opens:

      Adding documentation, version information, short description, and/or individual GUI Icon

      Figure 124. Adding documentation, version information, short description, and/or individual GUI Icon


    2. Enter a version number for your library element if you want to.

    3. Enter a short description for your library element if you want to.

    4. To specify a specific icon to be displayed together with the library element on the VisualApplets GUI, in field Icon File specify the path to the PNG file or use the navigation button on the right hand side of the field.

    5. To add documentation describing your user library element, click the plus button under HTML Help Files and navigate to the HTML file that holds the text of your documentation.

      You may specify multiple HTML and image files. If you add multiple HTML files, the first HTML file in the list will be the starting page of your documentation. The starting page is displayed as documentation of your user library element (in the information panel, tab Help). The additional files may contain images or further HTML files that are linked by the starting page.

      [Note] Naming and Storage of Help Files

      When you save your user library element later on, all the files you specify here will be copied to the VisualApplets installation directory, sub-directory LibraryCache. The starting page of your documentation (first HTML file in the list) will be renamed and will have the name of the user library element:<elementname>.html

      To unlink an HTML file from the library element, select the file and click on the delete button. The HTML file will be unlinked, but remains in your file system.

    6. Confirm the details specification of your new user library element with OK.

  6. If you want to protect your user library element, select the Protection option. This way, the user library element is made a “black box”. (For details on element protection, see 'Protecting User Library Elements'.)

  7. Click Save.

    The optional PNG and HTML files are copied to the VisualApplets installation directory, sub-directory LibraryCache.

    If you activated the Protection option, an additional dialog Protect User Library Element appeares.

    1. Make sure protection mode Password is activated.

    2. Enter your password and click OK.

      Providing a password for a library element

      Figure 125. Providing a password for a library element


    All User libraries and their contents are available in the library panel (see 'Main Program Window'). Click on the User Library tab to display the User Library window.

    The icon you selected is visible together with the library element.

    Detailed information on an individual element is displayed in the tooltip:

    Tooltip Information on User Library Element

    Figure 126. Tooltip Information on User Library Element


    If you select the new user library element, the according help information is displayed in the information panel under tab Help.

    The display within the design window has changed: Instead of "HierarchicalBox", the name of the user library element is displayed. The icon for hierarchical boxes has been replaced by the icon you selected for the library element. The name of the instance within the design (below the icon) has remained the same.

    Display of Your Library Element in Design

    Figure 127. Display of Your Library Element in Design


You can change your user library element any time later on (see section 'Editing User Library Elements'. However, these changes will not be promoted to the instances of the element. You have various options for updating the instances of a user library element if you want to (see section 'Updating Instantiated User Library Elements'.

[Note] Analysis of User Library Elements

Design Rules Check Level 1 is possible.

Resource analysis, build, and simulation are not possible.

Creating a New User Library Element from Scratch

Alternatively, you can create new user library elements from scratch. For defining and/or changing user library elements, you use the User Library Editor.

To define a new user library element from scratch:

  1. From the main menu, select LibraryEdit User LibraryNew User Library Element.

    Now, the design editor closes. Together with the design editor, also the design you have been working on is closed.

    The user library editor opens. The user library editor behaves like the normal design editor.

  2. Define a name for your new user library element.

  3. Select the target hardware platform.

    (However, the platform is only relevant if you include operators in your element that are dependent on hardware issues, such as camera operators.)

  4. Click OK.

  5. As soon as you click OK, a dialog box opens where you have to specify the number of input and output ports of your element. Make sure you specify the right number of input and output links since it is not possible to change these numbers later on.

    1. Specify the number of input ports you need.

    2. Specify the number of output ports you need.

    [Caution] Define necessary number of links

    Make sure you specify the right number of input and output links since it is not possible to change these numbers later on.

  6. Confirm the port definition with OK.

    The user library editor opens with an empty element design containing only the imput and output ports you just specified.

  7. Edit the design of your user library element as you want.

  8. When you are finished, save your element by selecting from the main menu FileSave As.

    Saving New User Library Element

    Figure 128. Saving New User Library Element


  9. Select the user library you want to save the new element in (or, alternatively, click on New User Library and define a new library).

  10. Optionally: If you want to add information on your element (version number, short description, individual GUI Icon, documentation in form of HTML help files):

    1. Click on Details. A new dialog opens:

      Adding documentation, version information, short description, and/or individual GUI Icon

      Figure 129. Adding documentation, version information, short description, and/or individual GUI Icon


    2. Enter a version number for your library element if you want to.

    3. Enter a short description for your library element if you want to.

    4. To specify a specific icon to be displayed together with the library element on the VisualApplets GUI, in field Icon File specify the path to the PNG file or use the navigation button on the right hand side of the field.

    5. To add documentation describing your user library element, click the plus button under HTML Help Files and navigate to the HTML file that holds the text of your documentation.

      You may specify multiple HTML and image files. If you add multiple HTML files, the first HTML file in the list will be the starting page of your documentation. The starting page is displayed as documentation of your user library element (in the information panel, tab Help). The additional files may contain images or further HTML files that are linked by the starting page.

      [Note] Naming and Storage of Help Files

      When you save your user library element later on, all the files you specify here will be copied to the VisualApplets installation directory, sub-directory LibraryCache. The starting page of your documentation (first HTML file in the list) will be renamed and will have the name of the user library element:<elementname>.html

      To unlink an HTML file from the library element, select the element and click on the delete button. The HTML file will be unlinked, but remains in your file system.

    6. Confirm the details specification of your new user library element with OK.

  11. If you want to protect your user library element, select the Protection option. This way, the user library element is made a “black box”. (For details on element protection, see 'Protecting User Library Elements'.)

  12. Click Save.

    The optional PNG and HTML files are copied to the VisualApplets installation directory, sub-directory LibraryCache.

    If you activated the Protection option, an additional dialog Protect User Library Element appears.

    1. Make sure protection mode Password is activated.

    2. Enter your password and click OK.

      Providing a password for a library element

      Figure 130. Providing a password for a library element


    All User libraries and their contents are available in the library panel (see 'Main Program Window'). Click on the User Library tab to display the User Library window.

    The icon you selected is visible together with the library element.

    Detailed information on an individual element is displayed in the tooltip:

    Tooltip Information on User Library Element

    Figure 131. Tooltip Information on User Library Element


    If you select the new user library element, the according help information is displayed in the information panel under tab Help.

  13. If you want to proceed working on your design, close the user-library-element design and the user library editor: From the main menu, select FileClose.

    [Caution] Close element design via File->Close

    It is not enough to close the element design by closing the tab of the design. You need to close the user library editor, too.

    To close both, click FileClose. Only after closing the design of your user library element (and thus the library editor) in this way, you can re-open the normal design editor and thus your overall applet design.

  14. To continue working on your design, open your design.

You can change your user library element any time later on (see section 'Editing User Library Elements'. However, these changes will not be promoted to the instances of the element. You have various options for updating the instances of a user library element if you want to (see section 'Updating Instantiated User Library Elements'.

[Note] Analysis of User Library Elements

Design Rules Check Level 1 is possible.

Resource analysis, build, and simulation are not possible.

Using the User Library

Inserting User Library Elements into Your Design

You can create an instance of an element by a simple drag & drop into your design (as you do with operators).

The instantiated module behaves like a hierarchical box, but knows it descends from the user library.

Adapting Element Instances to Your Design

You can adapt instances of user library elements to fit your overall design. You may need to

  • modify individual operator parameters
  • modify the layout (adding and deleting of operators and links)

[Tip] Changing Link Properties

Changed link properties do not change the implementation of the library element instance. Example: If a library element has been saved with a parallelism of 4, but its instance is connected to a parallelism of 8, this of course has an influence on the links inside the instance. However, this is not a change of the implementation of the instance as no operator parameters are influenced by a change of the link properties.

After you changed an instance of a user library element - either by modifying individual operator parameters, or by modifying the layout (adding and deleting of operators and links), the instance is no more a mere copy of the user library element.

To keep you informed which instance contains changes, the modified user library element instance is marked:

Figure 132.


This is very important for you to know, as updating the instances of a user library element (see section 'Updating Instantiated User Library Elements') overwrites the changes you made to an instance. You should always carefully consider the pros and cons before selecting an automatic update for an instance that contains changes.

Protecting User Library Elements

You can protect user library elements. After protection has been enabled, the user library element is made a “black box”.

There are two ways to protect a user library element:

  • Protection via password: The user library element can afterwards be opened and edited via password. Users that do not have the password will not even be able to see which operators are used in the user library element (black box).
  • Irreversible protection: The user library element is made a black box for ever and cannot be re-opened, not even by yourself.

To protect a user library element via password:

  1. Right-click on the element.

  2. From the context menu, select Protect User Library Element.

    Protecting a user library element

    Figure 133. Protecting a user library element


  3. Make sure protection mode Password is activated.

  4. Enter your password.

    Entering password for protected user library element

    Figure 134. Entering password for protected user library element


  5. Click OK.

[Caution] "One-Way" Protection Irreversible

If you select protection mode One Way (instead of Password), the user library element can never be re-opened, not even by yourself. If you plan to enhance the element at a later point of time, make sure you select protection mode Password instead. Alternatively, you can save a copy of the element (as a hierarchical box or a non-protected operator) before enabling this protection mode.

Editing User Library Elements

You can make changes to your user library elements. You can do this by either

  • editing the library element itself in an library editor, or by

  • overwriting it with a changed instance or a hierarchical box.

However, these changes are not propagated automatically. If you want an instance of a library element to reflect the changes you made to the element, you need to update the instance (see section 'Updating Instantiated User Library Elements').

Editing User Library Elements in the User Library Editor

You can edit your user library elements in the user library editor. To open the user library editor:

  1. Save the design you are currently working on.

  2. In the library pane, go to tab User Library.

  3. Right-click the element you want to edit.

  4. From the context menu of the element, select Edit.

    Opening the User Library Editor

    Figure 135. Opening the User Library Editor


Now, the design editor closes. Together with the design editor, also the design you have been working on is closed.

The user library editor opens. The user library editor behaves like the normal design editor.

  1. Make your changes.

  2. Save your changes.

If you want to edit the element description and version number:

  1. From the main menu, select LibraryElement Details.

  2. Save the edited element.

Analysis of User Library Elements: You can carry out Design Rules Check Level 1. However, bandwidth analysis, resource analysis, build, and simulation are not possible.

[Important] Updating Instances

When you make changes to user library elements, the instantiated elements in your designs are not updated with these changes. If you want an instance of a library element to reflect the changes you made to the element, you need to update the instance (see section 'Updating Instantiated User Library Elements').

Editing a User Library Element via Overwriting

Alternatively, you can edit a user library element by simply overwriting it. To do so:

  1. Save a hierarchical box or an instantiated user library element under the name of an already existing user library element (as described in 'Saving a Hierarchical Box as a User Library Element').

[Important] Updating Instances

When you make changes to user library elements, the instantiated elements in your designs are not updated with these changes. If you want an instance of a library element to reflect the changes you made to the element, you need to update the instance (see section 'Updating Instantiated User Library Elements').

In the following sections you get information on how to update instantiated user library elements.

Updating Instantiated User Library Elements

In the normal workflow, it happens that user library elements need to be updated. The changes you make to an element, however, have no influence on the instances of this element. To update the instances of an element in your design(s), you can either add your changes manually, or use one of the two update mechanisms provided by VisualApplets (see below).

Updating Manually

If you decide to update the instances of the changed element manually, you can select multiple instances of the element in your design and change them all simultaneously in one step.

[Caution] No Hierarchical Update

Hierarchical update of user library elements is not supported. If you select more than one module of a hierarchy for updating, only the highest module of the hierarchy is updated.

Replacing Modules via Quick Update

You can update the instances of a user library element in a design via the function Quick Update.

[Caution] Updating Overwrites Changes within Instances

Updating the instances of a user library element overwrites all changes you made to an instance (parameter settings, or adding/deleting operators). You should always carefully consider the pros and cons before selecting an automatic update for an instance that contains changes.

To keep you informed which instance contains changes, modified instances of a library element are marked:

To update the instance of a library element via Quick Update:

  1. Select the instance you want to update.

  2. From the main menu, select LibraryQuick Update from User Library.

The selected instance of the element is replaced by a new one that reflects the changes you made to the element in the library.

Quick Update is only possible if the instances you want to update have the same number of input and output ports as the edited user library element. It is not possible to use Quick Update for replacing the instance of a user library element type A by an instance of user library element type B.

Via Quick Update, you can update multiple instances of an element at once:

  1. Press the Ctrl key and hold it pressed while you select all instances you want to update.

  2. From the main menu, select LibraryQuick Update from User Library.

    All selected instances of the element are replaced by new ones.

Replacing an instance via Update from User Library

When you select this option, the instances you want to replace do not have to be of the same type as the library element they are updated with. Thus, you can use this option to replace instances of user library elements or hierarchical boxes by the instance of another user library element. For example, you can replace the instance of a user library element type A by an instance of user library element type B (in contrast to option “Quick Update”). Nevertheless, also Update from User Library is only possible if if the instances you want to replace have the same number of input and output ports as the user library element you want them to replace with.

To replace one or more instances of an element by instances of another user library element:

  1. Select the modules you want to replace (holding the Ctrl key).

  2. From the main menu, select LibraryUpdate from User Library.

    The dialog window Update User Library Elements opens. The left-hand panel shows the module(s) you have chosen for update. The right-hand panel shows your user libraries.

    Replacement of Instances

    Figure 136. Replacement of Instances


  3. In the right-hand panel, select the user library element you need. In the left-hand panel, all modules which can be replaced as you desire are highlighted in green (if not, check if the numbers of inputs and outputs fit).

  4. Click Replace Modules.

    Instantaneously, all listed modules with matching numbers of nodes are replaced by instances of the new user library element.

Example above: The numbers of inputs and outputs do not fit in two cases. Module 28 has only 1 input and 1 output port, whereas USRLibraryELement5 has three inputs and three outputs. Replacement of modules 32, 31, and 33 by USRLibraryELement5 is possible as they have exactly the same number of input and output ports as USRLibraryELement5.

Transforming a User Library Module into a Hierarchical Box

Sometimes you might find it helpful to unlink an element instance from the user library. To do so, you can transform instances of user library elements into hierarchical boxes.

  1. Select the module you want to transform in your design. (If you want to transform more than one module, press the Ctrl key and select all modules you want to transform.)

  2. From the main menu, select LibraryChange to Hierarchical Box.

Instantaneously, all selected modules are transformed into completely independent hierarchical boxes.