there are no group or ungroup commands, to group you create a groupItem Object and move stuff inside it. To ungroup, you take stuff out of the group (move them out).
Thanks for the info.
Could anyone give an example of moving pageItems out of a group of the active layer?
I know how to get the value of all the group Items in an active layer but I do not know the proper syntax to use to pull the page items out of it.
Awesome! I have more than one group on the layer and by adding a For loop to get the value of all groups I was able to use your example to get those groups out of there.
var myLayer = app.activeDocument.activeLayer;
var group = thisDoc.activeLayer.groupItems;
var mygroups = group[d];
for (i=mygroups.pageItems.length-1; i>=0; i--)
Unfortunately I will have groups within groups from time to time. Do you know a way to make the script check for groups on the active layer over and over till there are no more groups? It escapes me.
Thanks for your help,