Dynamic hierarchies
In object browser dialogs, you can define hierarchical folder trees that are dynamically created and populated based on the attributes and attribute values that COS objects have. In a dynamic hierarchy, each folder shows a list of objects that have the same value for the same attribute, such as all the components made by the same component manufacturer. Dynamic hierarchies are easy to set up and maintain: if the attributes assigned to an object are changed, the object automatically appears in the relevant hierarchies. However, the level of customization is limited by the possible attribute values; you cannot hide unnecessary objects from the tree unless you define an attribute for that purpose.
Dynamic hierarchies are characterized by these properties:
-
Objects are automatically arranged into the hierarchy tree, no need for manual editing to update the tree.
-
Different kinds of hierarchy trees can access the same data.
-
You can decide the hierarchical order of the attributes in the hierarchy tree. Examples:
-
Component Type > Manufacturer > Connection Type
-
Manufacturer > Component Type > Connection Type
-
-
Easy to create new customized hierarchy trees.
-
New levels are added to existing hierarchies on the fly.
-
Good for browsing data, but not necessarily suitable for making a selection.
-
Stored in the library or the project database.
The type of an attribute that you use to create a dynamic hierarchy can be one of the following:
-
Enumerated, Coded enumerated – As all the possible values are listed in the COS schema, listing the folder contents is fairly quick. You can use Customize > Show Empty Folders Grayed to see which folders contain objects.
-
Floating point – The values must be queried from the database, which makes listing the folder contents slower than that of enumerated values. Only folders that actually contain objects are listed in the tree.
-
String – The values must be queried from the database, which makes listing the folder contents slower than that of enumerated values. Only folders that actually contain objects are listed in the trees.
Creating a dynamic hierarchy
In this example, you create a dynamic hierarchy called "Component Info" that arranges Catalog Parts into a tree based on component manufacturer and component type.
Do the following:
-
In Plant Modeller, select File > Environment > All Library and Project. The Project Environment dialog opens.
-
Browse to [library or project] > Components > Catalog Parts > Catalog Parts.
-
If the hierarchy pane is not visible, click .
-
In the hierarchy pane, select Customize > New Dynamic. The Edit Dynamic Hierarchy dialog opens.
-
Define the hierarchy:
-
In the Name field, enter the name "Component Info".
-
In the Stored in/context field, select the target database.
-
In the Attributes list, find the attributes "Component manufacturer" and "Component type" and use the Add button to add them to the Selected attributes pane. (Using Add Tree would also add all the sublevel attributes of "Component type", which is not wanted in this case.)
-
Use the Move Up, Move Down buttons to define the order of the attributes in the hierarchy tree. The Preview pane shows the tree structure that the specified order creates.
-
Share the hierarchy with others? is enabled by default. Clear the option if you do not want other users to access this hierarchy.
-
Click OK.
The Catalog Parts list is now arranged according to component manufacturer and component type.
-
-
The attributes that define this hierarchy use enumerated values, so if you enable the option Customize > Show Empty Folders Grayed you can see from the color of the folder image whether a given folder contains items.