Creating a local variant

Condition

If you want to create a local variant of a library element, this element must have been deployed with the fully existing source code, hence e.g. an ST-object with the complete ST-code or an FBD-object with the complete FBD-logic.
This means: It is not possible to create a variant of the following library elements:

Moreover, logi.cals advises against creating variants for elements of object-oriented programming (even if this would be possible). Reason: It cannot be guaranteed that the variants for these elements will be correctly created and processed. In logi.CAD 3, it is possible to declare the following elements of the object-oriented programming:

  • →interfaces

  • →methods

  • →function blocks that are derived from a base function block (by using the keyword EXTENDS)

  • function blocks that are implementing i nterfaces (by using the keyword IMPLEMENTS) and/or that are containing methods

How to create one local variant:

  1. Within the →project, select the library element for which you want to create the local variant. Open the context menu and select the command Create Variant.
    Alternative: Expand the library element, open the context menu for the displayed sub-level item and select the command Create Variant.

  2. In the dialog, select a folder where to file the variant and click OK.
    Result: In the project explorer the local variant is usually displayed with the decorator images/download/thumbnails/409862641/Variant-version-1-modificationdate-1531214418362-api-v2.png at the name of the variant, while the original within the library is hidden by default.
    Example for the display: images/download/attachments/414778553/STVariant-version-1-modificationdate-1534252326905-api-v2.png

Now you are able to adjust the local variant to your demands at once. But mind the following so that logi.CAD 3 will be able to recognize and process the local variant correctly while you adapt it:

  • Do not change the name of the local variant.

  • When modifiying an ST-object, take care that you do not delete or change the first line {FromLibrary := ... }.