In 16.1 we added some new group commands, two of which are very helpful in this situation:
groupnummembers(groupName) - returns the number of group members
groupmember(groupName, rank) - returns the group member at the specified rank
Using these new commands we can write the following code to loop through the group members:
for(int i = 1; i <= groupnummembers("Group1"); i++) {
pt(getname(groupmember("Group1", i))); pr();
}

Kim Jh,
Here is an alternative approach if you are using an earlier version than 16.1:
All groups are located in the node "Tools/Groups" in the model. The following code will print the names of all the objects in "Group1" to the output console.
treenode groups = node("/Tools/Groups", model());
treenode mygroup = node("/Group1", groups);
for(int i1 = 1; i1 <= content(mygroup); i1++){
treenode tempobj = ownerobject(tonode(getnodenum(rank(mygroup, i1))));
pr(); pt(getname(tempobj));
}The nodes in the group are couplings to the objects in the group. The code that sets the tempobj variable is the method that I use to get the node that owns the other side of that coupling.
Good Luck,
Brandon