Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata


Project Inheritance allows one project to inherit resources from another project. If you have project resources that you want other projects to use such as views, windows, scripts, templates, or pipelines, you can create an inheritable project allowing other projects to inherit those resources. The project inheriting the resources can also overwrite the resources and let you re-define them specifically for that project. 

Project inheritance is extremely flexible in that it allows each project to have a parent project that inherits all the resources of that parent project. The inherited project, in turn, can also be configured to be 'inheritable' and become a parent project itself allowing for complex hierarchies of re-usable resources to be designed. Within each project, inherited resources may be used by other, “local” resources. For example, an inherited Vision template could be embedded in a window, or an inherited script could be executed by a button.

This page demonstrates how project inheritance allows you to share resources across multiple projects as you deem fit by pointing one project to another project, and overriding resources to re-redefine resources specifically for the project you're working on.

Configuring Project Inheritance

In order to make a project inheritable, you need to enable project inheritance on the project containing the resources that you want to share. 

In this example, we have two projects: one project called 'global' which contains some project resources, and another project that is not inheriting any resources called 'Project_X.'  Since we will be sharing the resources from the 'global' project with Project_X, let's first configure the 'global' project to be inheritable.


On this page ...


IULocgo


Project Inheritance

Configuring Parent Project

  1. Go to the Config tab on the Gateway Webpage, and select Systems > Projects. This brings up a list of all your projects. You'll notice that for each project listed, you'll see at a glance if a project is Inheritable, and if so, the name of the Parent Project will be displayed. 




  2. Find the project you want to make inheritable, and click the Edit next to the project name (i.e., global) to open the Project Settings window. 

  3. Enable the Inheritable property, and click Save.

    Allow Overrides

    When you make a project inheritable, the Allow Overrides function is set by default on all project resources in the inheritable project. This allows all project resources to be propagated to all inherited projects. 



     

Cannot Launch Inheritable Projects

When you have a project that's flagged as inheritable, you can not launch it as a stand-alone project (i.e., Perspective Session or Vision Client). You will get a 'Project Not Runnable" error message. If you have an inheritable project that you want to launch, you must have another project to inherit from it. 


Configuring Child Project

Now that we have an inheritable project, let's setup an existing project (i.e., Project_X) so it inherits resources from the 'global' project.

  1. Under the Config tab select System > Projects page
  2. Find your project and click the Edit button. 
  3. Select the inheritable project from the Parent Project dropdown list (i.e. global), and click Save.


Using Inherited Resources

You can treat an inheritable project as a library of resources for use in other projects. When project resources are changed in the original project, these changes will get passed down to the inherited projects. The same thing is true if new resources are added to the inheritable project. By using inheritable projects, you can create a resource library that will help designers build their projects more quickly, ensure consistency and reusability across all their projects. 

To view your inherited resources, go to the Designer and open your inheriting project (i.e., Project_X). Expand the folders that contain resources, and you'll notice that the inherited project resources are grayed out, including the Perspective Views and Vision Windows folders. Grayed out resources mean that those resources are inherited, and can only be edited from their original / parent project. Anytime a new resource is added or an existing resource is changed in the inheritable / parent project, it will propagate down to the inherited project and will appear grayed out unless that resource is overridden.

You can view a grayed out resource by either selecting the Open read-only option or hovering your mouse over the resource name in the Project Browser. Each resource displays a little differently: hover over the resource using your mouse,or click on the resource name to open it.



Inheritance and "runnable" Resources

Some resources in a project "run" or execute in every leaf project (that is, a project that is not inherited by any other project) in the inheritance chain. Thus, if multiple projects inherit from the same parent project, then each leaf project will contain runnable resources, potentially resulting in duplicate executions. 

The diagram below represents an inheritance hierarchy on a single gateway. A "Root" project contains a Gateway Tag Change script. Two projects inherit from the Root, so they'll inherit the script. In both cases, the inheritance chain leads to leaf projects. In this single gateway, two running instances of the same tag change script exist, meaning there will be duplicate script executions. 


In the case of resources that "run", it is highly advised that they exist in a leaf project, or a standalone project (a project that does not participate in inheritance at all). In regards to the diagram above, we could prevent duplicate execution of our Tag Change Script easily by moving the Tag Change Script to a separate, standalone project:

"Runnable" Resources

The following resources are considered "runnable":


Overriding Inherited Resources

To edit a resource in an inherited project, you need to override the resource by right clicking the resource and selecting Override Resource. By overriding the inherited resource, the resource is recreated in the inherited project, and any future changes made to the original project resource will not propagate down to the inherited resource.

If new resources are added in the inheritable / parent project, they will automatically propagate down to inherited projects. New resources that are added in the inherited project will be displayed as grayed out. You will need to override each new resource to edit it.

Deleting Inherited Resources

Inherited resources that have been overridden can be deleted from an inherited project. When you delete an inherited resource, it doesn't delete the resource from the inheritable / parent project, it deletes the 'Override' you previously placed on the inherited resource. The inherited project resource will return to the version that is currently in the inheritable / parent project (without your edits), and the resource becomes grayed out in the Project Browser.

  1. To delete the override on an inherited resource, right click on the resource and select Delete
  2. A dialog box will popup confirming you want to delete the selected node, click Yes. The resource will immediately be grayed out preventing designers from editing that resource. 


Renaming an Inherited Resource

You can easily rename an inherited resource, but beware that when you rename a resource, the inheritable project will propagate the original resource to the inherited project. For example, say you have an inheritable project resource named 'Map_Transform' and you renamed it to 'CA _Map_Transform.'  Ignition knows that the original project resource is no longer there, and because the project is flagged as inheritable, it will  propagate that original resource to the inherited project. Now you have both the renamed 'CA_Map_Transform' and the original inheritable resource 'Map_Transform.' 


Inheritable Project Examples

There are many ways how you might want to configure and organize your inheritable projects. It's whatever works best for your organization and design projects. Here are a couple of common ways to organize your shareable resources.

  • You can create one inheritable project that contains many project different resources: scripts, pipelines, views, templates, windows, SFCs, etc. This is one inheritable project containing all your inheritable project resources. 
  • Another option is to create several inheritable projects. You can have one inheritable project dedicated for each type of rersource: one for scripts, one for views, one for templates, one for pipelines, etc.


Project Export

When a project is exportedyou don't get any inherited resources with your export. However, if a project resource was overridden and edited, that essentially becomes a new resource and will be included in a project export. Resources that are inherited and not overridden will have to be included as part of an inheritable project export. Once a new project is imported into a Gateway, you can always configure that project to inherit from another project.




  • No labels