You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing email@example.com.
We are experiencing playback issues from our video hosting provider. Please check back shortly.
Learn the basics on sharing resources between a parent and child project.
Video recorded using: Ignition 8.0
Transcript(open in window)
[00:00] In this lesson, we'll talk about project inheritance. Project inheritance allows one project to inherit the resources from another. To demonstrate, I have two designers open. One is looking at a project called Project 1. Project 1 has some resources. It has a perspective view. If we go down to the vision module, it has a window, it has a template. It even has a report from the reporting module. So I can have another project inherit those resources. For right now, I'll move Project 1's designer out of the way and we can see that I have Project 2 here in a separate designer session. Project 2 doesn't have any resources. I just created it. So we'll configure it so that Project 2 inherits the resources from Project 1. Now, just to eliminate confusion, I'm going to close Project 2's designer. To enable inheritance, you must go to the gateway under the configure section on the project's page. We can see both of our projects and at least one of these have to be inheritable. To make Project 1 inheritable, we can click the edit button. And for the inheritable property, we need to enable this. So I'll check this property, scroll down, and I'll click save. And we can see that those changes have been applied. So now that I have an inheritable project, let's configure Project 2 so that it inherits from Project 1. We'll hit the edit button again. And I'm not going to set the inheritable property here although I could. It is entirely possible to chain multiple inheritable projects. We'll keep it simple for now. I simply need to set the parent project property. So if we click on this drop-down here, we see Project 1. That's because Project 1 is inheritable. If it wasn't inheritable, we wouldn't see it in this list. So I'll select Project 1, we'll scroll down here, save our project, and you can see we're ready to go. The parent project has been set for Project 2. So let's head back to our designer. I don't need to make any more changes to Project 1 here so we'll go to File, Open, and I don't need to save any changes here. We'll switch over to Project 2, which is now inheriting from Project 1. I'll open the project. So now we're in Project 2 here. And you can see some of the resources are grayed out including under the Perspective area here. Grayed out resources means that the resource has been inherited. All of my views in this project are inherited, so the entire Views folder is grayed out. Inherited resources can only be edited from their original project. So if I try to right click on my view here, it doesn't give me any sort of open options. Instead, I can override it. So if I override the resource, it recreates that resource inside of this new project. So because I'm overriding, changes made to the original view in Project 1 won't propagate down to this view, but I do have all of my original configuration so I could simply start adding new components here. When you have an inherited resource like this, if you try to delete it, so if I right click, go to Delete and then say yes I want to delete the node, it doesn't delete the resource in Project 1, rather it just deletes the override we created in Project 2. You can see that we're still inheriting my view from Project 1 in the project browser. Now you can still use these resources so for example, if I were to right click on the Views folder, create a brand new view, and if we were to say, place an embedded view component down or some component or object that references one of my inherited resources, so we could collapse everything, go down to embedding, grab an embedded view, and with this embedded view, if we change the path to my view which is being inherited, click Okay, and you can see that it does have the original configuration. So now we're treating the resources in Project 1 as a base library of resources. If I want to make changes to my view, I can open Project 1 in the designer, make changes, and any other projects that are inheriting those resources will see the updates. Now something really important to note here, I'm going to head back to my gateway and if I scroll up here, head back to that Home, and if I take a look at my perspective projects here, you'll notice that I can't launch Project 1 anymore. So when you have a project that's flagged as inheritable, you can't launch that as a stand-alone project anymore. So in that case, if you have an inheritable project, you'll want another project to inherit from it. This applies to the visualization systems as well as other resources like my report.