<< Click to Display Table of Contents >> Using Relationships |
This chapter describes how you can create, change, and delete Relationships between objects and how you can use them to navigate between related objects.
The example used in this chapter is a continuation of Using Not-Placed Objects.
In this section we explain how relationships are represented in the Relationship Panel. To open the Relationship Panel you use the context menu and select Relationships. The data shown in the Relationship Panel are from the object you stood on when using the context menu. Select the Gear. In the Relationship Panel you see that the Instrument 10-HS-001 is shown below the Gear. This means, that the Gear is the Owner of the Instrument. When you expand the tree of the Instrument 10-HS-001 you will see the Instrument 10-SOA--001. This means, that the Instrument 10-HS-001 is the Owner of Instrument 10-SOA--001.
|
Change Relationship to another Object
In this section we explain how you can change the owner of a relationship. To change or move the Relationship to another Owner you chose the 2 Owners with the CTRL key. In this case the Gear and the Motor. Now you drag and drop the Instrument 10-HS-001 from the Gear to the Motor. You will be asked if you want to change the Relationship. No terminates the change and thing will have happened. When you have selected Yes the Instrument 10-HS-001 has the Motor as the new Owner. If you expand the tree of the Instrument 10-HS-001 again, you will see that the Instrument 10-SOA--001 is still owned by Instrument 10-HS-001.
|
In this section we explain how you can create a relationship. If you want to create a new Relationship between the Motor and the Gear, you simply drag and drop the Motor onto the Gear. Here a dialog also asks you if you want to continue. No will also terminal the creation of a new Relationship. When you select Yes you will see the Gear in Bold under the Motor. A bold line under another node always means, that this is the Owner. You can expand the tree again and you will see, that all existing Relationships are still there. Now we select the Gear and the Pump with the CTRL key pressed. You you see the Line Segment also in bold. In this case the Line Segment appears in bold, because the Line Segments is connected to the Pump. Another way of creating a Relationship is to use the context menu in the Relationship Panel. First you select the owner and use Set as owner. Then you select the node which should be owned and use Set as owned. Remark: Using the context menu can be useful if the content of the Relationship Panel is so long, that drag and drop may be cumbersome. After using Set as owned the dialog appears as well. After clicking on Yes and then select only the pump you will see the relationships from top to bottom.
|
In this section we explain how you can delete a new relationship To remove the relationship between objects you always select the owned object and use Delete relationship with owner from the context menu in the Relationship Panel. A dialog appears and asks you if you are sure. Clicking on No will terminate the deletion and nothing will have happened. When you select Yes the tree collapses. When you expand the tree again, you will see, that the Instrument 10-SOA--001 is gone. Next we delete the relationship of an object which itself has owned objects. Select the Gear and use Delete relationship with owner. Select Yes. Select the Gear in the grid and expand the tree under Gear. You see, that the owned objects of the Gear are still there.
|
Use Relationship Panel to Navigate
In this section we explain how can use the Relationship Panel to navigate between related objects. You can use the Relationship Panel also to navigate or jump to the object in the tree. One method is to use the context menu in the Relationship Panel and select Go to object. Now the class of the object in the class tree view is selected and the row of the object is selected as well. Sometimes it can be hard to see which row it is. For that you just pay attention to the row indicator arrow in the very first column. The PropertiesPalette shows the object's data as well. You can also make a double-click on a node. That has the same effect on the class, the grid and the PropertiesPalette.
|
Next Chapter: Links, Calculations & Properties