Using Data Groups
Using Data Groups
This section will review the methods for defining, activating, and manipulating data groups within Partiview. To discuss these concepts, we have created a config file called groups.cf. Let's load this file into an empty Partiview session using the read command:
read ./data/mandata/groups.cf(You may need to type the complete path.)
Once you have the file loaded, you will see the familiar Test Data appear. Along with the test data button, you will also notice three other data group buttons, complex1, complex2, complex3. Using these data groups, we will run through some of the more common operations on data groups.
Defining a Data Group
As we have shown in the previous section, a data group is defined using the gN command; however, there are several variations on this command. Typically, it is wise to assign a name, or alias, to each of your data groups using the gN=alias command. If you look at the groups.cf file, you will notice that we define each data group with the object command
object g1=test
How to Refer to Data Groups
Data groups can be referenced using either the group number or the group name. We are encouraging the use of names simply because data often get shuffled around which then changes the group number for a particular data set. However, the name of that group, in most cases, will remain the same. Therefore, when using the Command Line, we propose referring to data groups by using the object alias command. For example, type this command in the Command Line:
object complex1
This changes the active data group to group 2 since complex1 is defined as group two (g2). The object alias command is more powerful than simply selecting a group, you may also append group control commands to control how the group is displayed. For example, you can turn on the complex2 group and change its color and luminosity using these commands:
object complex2 on
color const 1 .5 0
object test color const 0 0 1
label off
This gives you the tools to switch between data groups and execute commands from the Command Line. Behind the scenes, the object alias command is changing the active data group; this is why the following commands do not need the object alias command to preface them. However, there's more than one way to specify the active data group.
Setting the Active Data Group
The active data group is the data group on which all group Control Commands will act. For example, if you want to change the color, luminosity, label size, polygon attributes, or any other data-group-specific parameter, you need to be sure you are acting on the appropriate group by selecting it to be the active group.
There are several ways to set the active data group, these include:
- Selecting the group from the Groups Menu
- Right-clicking on the group button which will also display the group (in older versions of Partiview you must stop your flight for this to take effect)
- Using the command object alias
- Issuing the gN command.
The quickest method is to use the group buttons. If you're using the Command Line, we discourage the use of the gN command since group numbers often change. Rather, we prefer using object alias if you're using the command line.
More often than not, when you are trying to change the display of a data group and nothing is happening, it is because you are acting on the wrong data group and need to change to the appropriate group. Be sure to inspect the active data group indicated below the Groups Menu.
Operating on all Data Groups
There is a command to operate on all data groups at once. The command gall will allow you to perform any group Control Command on all defined data groups. For example, if you turn on all data groups and fly away from the data so you can see each of the groups, you can brighten them all up by a factor of three using the slum command by typing:
gall slum *3
Or, you could turn on all the labels, resize them, color all data white, and then turn off all data groups using these commands:
gall label on
gall lsize *2
gall color const 1 1 1
gall off
If you use the -v option,
gall -v
you will get a report of all data groups and their display status.
© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott
