Using the library reference and its syntax

The library reference of the →project manages the →libraries installed within the project. Thus, libraries and their elements can no longer be manipulated within logi.CAD 3. For instance, it is no longer possible to delete system blocks from a system library by mistake.

Modifications of the library reference are not needed by default.

  • Usually, you do not edit the library reference of a project. Reason: The content of the library reference is automatically adapted, if you are installing or removing libraries within the properties of the project.

  • Only if you need to store a library outside the library providers, you have to adapt the content of the library reference. This requires some knowledge of the syntax of the library reference.

This article contains the appropriate information so that you are able to edit the library reference:

Displaying library reference

By default, the library reference is not visible within the project explorer. Have the library reference displayed as follows:

Click images/download/attachments/451280970/IconViewMenu-version-1-modificationdate-1598000630466-api-v2.png in toolbar of the project explorer and select Filters and Customization... In the dialog, uncheck Library reference file (under Filter) and click OK.
Result: The library refence libraries (shown with icon images/download/thumbnails/443057714/LibraryReference-version-1-modificationdate-1586874261773-api-v22.png ) is displayed within the project explorer.

No manipulations, such as deleting/renaming

Avoid manipulations of the library reference within the project explorer, such as deleting or renaming the object. If you do nevertheless, logi.CAD 3 does not find the blocks any longer. logi.CAD 3 informs you that the library cannot be installed.

Representation/actions within editor for the library reference

  • The contents of the library reference is displayed within an editor similar to the ST-editor. Subsequently, you are able to use the features of the ST-editor (e.g. Inhaltshilfe (Code-Assistent oder "Content Assist")) within the editor for the library reference as well.

  • You are able to apply the actions within ST-editor to a large part within the editor for the library reference . Just select a command within the the library reference . If the result is not to your liking, undo the action (menu Edit, Undo).

  • However, the editor for the library reference supports a different syntax than the ST-editor. See the following section for the correct syntax within the editor for the library reference .

Syntax for the library reference

Syntax
LIBRARY name1 VERSION := "number" (* optional_begin *) {SOURCE := "path1" PROVIDER := provider1 } (* optional_end *);
LIBRARY name2 VERSION := "number" (* optional_begin *) {SOURCE := "path1" PROVIDER := provider1 } (* optional_end *);
...

Meaning

list of the →libraries that are installed in the project – name1 etc. being the displayed name of the library and number being the version of the library

The following keywords PROVIDER and SOURCE are optional but they must be used together. Use both keywords to store a library outside the library provider.
Without these keywords, the library is stored using the library provider Local file system.

Keyword

Meaning

SOURCE

path in which the library is search at first
Depending on the library provider (corresponding to the specification under PROVIDER), the path can be an absolute path (for Filesystem) or a project-relative path (for Project).
If you want to file a library directly under the project (without any subfolder), enter no path (hence, just enter SOURCE := "") . But mind that this filing might cause a worse performance when opening/importing the project.

Only if the library is not found in this path, the library is searched for in the usual source of the library provider . See " Library provider and library cache " for information on the sources of the library providers.

PROVIDER

These values are possible:

  • Filesystem – This value corresponds to the library provider Local file system.

  • Project – This value corresponds to the library provider Current project.

Best practice is to use the content assist to enter a value:

  1. Position behind: PROVIDER :=

  2. Press Ctrl+Blank.

  3. Select the value from the content assist list (by pressing the Enter-key).

The following library references means that the system libraries System (with version 2.0.16) and Standard (with version 3.2.3) have been installed in the project. Moreover, the libraries com.Musterfirma.Controller and com.MyCompany.MyLib2 (both with version 1.1.0) are installed in the project – however, both libraries are not searched for in the usual source of the library provider but in the project subfolder MyLibraries or in the absolute path c:\tmp\.

Example
LIBRARY com.logicals.lc3.library.system VERSION := "2.0.16" ;
LIBRARY com.logicals.lc3.library.standard VERSION := "3.2.3" ;
LIBRARY com.Musterfirma.Controller VERSION := "1.1.0" SOURCE:="MyLibraries" PROVIDER:=Project;
LIBRARY com.MyCompany.MyLib2 VERSION := "1.1.0" SOURCE:="c:\tmp\" PROVIDER:=Filesystem;

Hiding library reference

Restore the default configuration of logi.CAD 3 by hiding the library reference in the project explorer again:

Click images/download/attachments/451280970/IconViewMenu-version-1-modificationdate-1598000630466-api-v2.png in toolbar of the project explorer and select Filters and Customization... In the dialog, check Library reference file (under Filter) and click OK.

Checking the project with the changed library reference

  1. Open the properties of the project, then go to the group Library and Libraries. There, check the following:

    1. Is the check box in column Install selected for the library? If this is not the case, the library has not been installed at all.

    2. Which settings are displayed in the other columns? The column Source for this library must display the path that you defined under SOURCE. If this is not the case, the library has been installed from the source of the displayed library provider or not at all.
      See "List of libraries provided or installed for a project" about the meaning of the columns or possibly displayed icons.

  2. Also check the content of the Error Log and Problems views whether there are errors reported on the libraries for the project. If yes, fix them.