You can group objects together to create a new single object. This is called a group, or grouped object. A grouped object is like having a rubber band around your picture that contains all the objects you grouped together.
The power of grouped objects is that they let you create custom objects which you can reuse without building new ones from scratch. Like other objects, grouped objects have properties you can modify and control. You can manipulate a group as an object while maintaining individual object properties and animations. However, grouped objects do not need to be permanent. You can always destroy a grouped object by ungrouping it. When you ungroup it, the rubber band containing the objects in the group is deleted, but the member objects are not.
Nesting Grouped Objects
You can nest a group inside another group. For example, you can create a pump from a group of rectangles and ovals and group them. When you group these objects, the iFIX WorkSpace adds a group name (Group 1) to the system tree for the group object and lists the individual objects that comprise the group one level down from the group name. The following figure illustrates this concept.
System Tree |
Grouped Objects |
|
|
If you draw a valve (Polygon1), a connector (PolyLine1), and group it with the pump (Group1), another object named Group 2 is created which contains the first group (the pump) and the objects used to create the valve (the Polygon1 and PolyLine1), as the following figure shows.
System Tree |
Grouped Objects |
|
|
Editing Grouped Objects
Once you create a grouped object, you can manipulate it like any other individual object, including moving, cutting, copying, and resizing it. Keep in mind, however, that when you ungroup an object, any changes you make to it affect the member objects. For example, if you resize a group before you ungroup it, you resize each individual object in the group.
Changing a group's animations, however, does not affect the member objects when you ungroup. To change the properties of individual objects, you must drill down into the group to select the object you want, without ungrouping the object.
Drilling Down into a Group
Drilling down allows you to meticulously control complex grouped objects. To drill down, select Enter DrillDown from the object pop-up menu and select the object in the group that you want to change. You can also hold down the shift key and click the object in the group that you want to change. Drilling down also lets you change the order in which the objects are stacked within the group.
For example, suppose you want to change the color and size of the polygon (the valve) in the following figure.
One way to do this would be to ungroup, make changes to the polygon, and regroup the objects. However, this can be tedious and time-consuming, particularly if you have many objects in the group that you need to change. In addition, if the group contains animations or scripts, the animation settings and the scripts are destroyed when you ungroup the object.
A more effective way to modify the polygon is to drill down into the group and make changes without ungrouping. This approach saves time because you don't have to ungroup and then regroup, and consequently you preserve any animations or scripts you have assigned to the group.
When you drill down into a group to change an object, a box of dashed lines appear around the group. Any additional groups will also display a dashed line box. To change only a specific object in a group, first select the group that contains that object. Then right-click the group and select Enter DrillDown from the pop-up menu. Now you can select the object you want. You can also hold down the shift key and click the object in the group that you want to select, as the following figure illustrates.
Nested Group Objects