Create contained templates
- Last UpdatedJul 29, 2024
- 2 minute read
Containment is the relationship in which one object includes another. Containment relationships organize objects in a hierarchy. You can build objects that represent complex devices consisting of smaller, simpler devices.
In scripts, these objects can be referred to by the name that derives from the containment relationship. This name is called a hierarchical name.
An object can have three kinds of names if it is contained by another object. The three names include:
|
Name |
Description |
|---|---|
|
Tag Name |
The unique name of the individual object. For example, Valve1. |
|
Contained Name |
The name of the object within the context of its container object. For example, the object whose Tag name is Valve1 may also be referred to as Tank1.Outlet, if Tank1 contains it and it has the contained name "Outlet". |
|
Hierarchical Name |
Hierarchical names that are fully-qualified names of a contained object include the name of the objects that contain it. Because the object that contains it may also be contained, there are potentially multiple hierarchical names that refer to the same object. For example, if: "Reactor1" contains Tank1 (also known within Reactor1 by its contained name "SurgeTank"). "Tank1" contains Valve1 (also known within Tank1 by its contained name "Outlet"). Valve1 could be referred to as: "Valve1" "Tank1.Outlet" "Reactor1.SurgeTank.Outlet". |
Note: Base templates cannot be contained by another template, either as the container or as the template being contained. You can only use containment with derived templates.
Higher level objects contain lower level objects. This allows you to more closely model complex plant equipment, like tank systems. You can nest templates to 10 levels.
Note: Objects can only contain objects like themselves. For example, ApplicationObjects can only be contained by other ApplicationObjects. Areas can only contain other Areas.