How to add an object that exists in a document to an existing group in a document?
the Illustrator Scripting Guide has an example of creating a group of pathItems
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var triangleGroup = app.activeDocument.groupItems.add();
// Create a triangle and add text, the new art is created inside the group
var trianglePath = triangleGroup.pathItems.add();
trianglePath.setEntirePath(Array(Array(100, 100), Array(300, 100), Array(200, Math.tan(1.0471975) * 100 + 100)));
trianglePath.closed = true;
trianglePath.stroked = true;
trianglePath.filled = false;
trianglePath.strokeWidth = 3;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
But it shows the process for newly created pathItems
Let's say that in the scene there is an pathItem called "Line01". How to add this pathItem to the group "Group 01"???
