Hi Peter, Thanks for your comments and suggestions. So we always need to use ungroup() to extend an existing group? In truth, that's the method my script invokes for the moment, but I don't regard this workaround as a robust solution, because there are recursion issues: if you want to add an object in the group G, then you have to ungroup G and to rebuild the result from the parent. But the parent is not necessary a top-level object (Page/Spread/Document). The group G could be embedded in another group (or page item!), which could be embedded in another one... Thus, we need to ungroup recursively the whole hierarchy until we reach a Page/Spread parent, and to rebuild the same structure so to add finally the new object in the last group. For each step, the procedure needs to store the corresponding page items datas for callback, including the groups we are temporarily destroying! What I see is that we cannot use the Groups.add() method from any page item, despite that the page item owns a groups property, which is the case of the Group object. The DOM and the documentation are pretty misleading about this. Basically, the Groups.add() method is prototyped to accept for the first argument an array of PageItem, and that's the way I use it in the instruction: hostGroup.groups.add( [obj1, obj2] ) IMHO, the code above should work, unless the DOM restricts explicitly the usage of Groups.add() for top-level parents. Assuming we have a few page items selected on the active page, there is no problem with the code below: var objs = app.selection; // or any page items array var host = app.activeWindow.activePage; // create a group on the page: var newGroup = host.groups.add(objs); But, if the host is a Group object, the last line fails... The conclusion is that --apparently-- every group that a script needs to create must be created from a top container (Page/Spread/Document). If you want to build a subgroup G2 inside an existing group G1, you must first destroy G1 (ungroup), then create G2 (on the page), then rebuild G1 (on the page) with G2 and the other elements. All of this supposes that G2 is a top-level object, else, welcome to recursion! Tricky, isn't it? @+ Marc
... View more