As an alternative to using the copy-paste-link functionality for your logicnets, you can create a library of logicnets that you want to include in multiple projects.
Both copy-paste-link and the library mechanism offer the same functionality--the re-use of logicnets. Use the table below to determine which one works best for your particular needs.
|Linking Type||Static: During the design phase, changes you make to the referenced logicnet are reflected in your project.
After publishing, a true copy of the referenced logicnet is included in the package. If you make changes to the original logicnet, these changes will not be reflected in the published project.
|Dynamic: The system loads the referenced logicnet from the published library project.
Any updates in the referenced logicnet are directly reflected without requiring the project to be republished.
|Advantages||During the design phase, changes in the library are directly propagated without requiring the library project to be republished.
If you make a change to an item in the library that breaks something, published packages are not affected.
|Upgrades to the library are automatically propagated to applications without requiring you to republish and re-install the applications.|
|Disadvantages||If you make a change to the library you must republish all related projects for those changes to be visible.||If you make changes in the library that break something, this can affect related applications.|
Create a Library Project
- Create a new project to serve as your library project.
- Create the logicnets that will live in your library.
- If a logicnet in your library is ready to be exposed as a public part of the library, mark it as ‘public’. To do this, go to the Details tab of your logicnet and click modify. Note: By default, logicnets are marked as ‘internal’.
- Save your logicnet changes and publish your library project.
Include the Library in a Client Project
Once you have created a logicnet or logicnets in your library and you want to use them in another application, you need to identify them in the other application.
- In the Project pane, select the project in which you want to use a library logicnet.
- Click modify on the project Details tab.
- Go to General section in the project settings and in the section libraries and click the ellipsis button (…) to open the browser for selecting your published library package.
- Give the library an alias.
- Select the logicnet in which you want to add a call to one of the logicnets exposed by the library.
- Select Add node > Call to add a new call node. The system opens the editor for the new call node.
- Go to the Call tab.
- Enter the alias of the library in the field for Library project. Note: This field supports auto-complete, and clicking on the dropdown button will bring up the list of library projects that are included in your project.
- Click the ellipsis button (…) next to the LogicNet to call field to bring up the list of logicnets exposed by the selected library. Select the logicnet you want to call.
- Select the project in your tree-view and click Test to verify that the system invokes the library function.
Download and import the following sample projects in your workspace.