Start with a selected anchored frame with a couple of graphics in it and run the code below.
#target framemaker
var doc, aframe, graphic, group;
doc = app.ActiveDoc;
// Selected anchored frame.
aframe = doc.FirstSelectedGraphicInDoc;
// Make a group inside the anchored frame.
group = doc.NewGroup (aframe);
// Add the graphics in the anchored frame to the group.
graphic = aframe.FirstGraphicInFrame;
while (graphic.ObjectValid () === 1) {
if (graphic.constructor.name !== "Group") { graphic.GroupParent = group; } graphic = graphic.NextGraphicInFrame;
}
// Rotate the group 45 degrees.
group.Angle = 45 * 65536;
// Select the group.
group.GraphicIsSelected = 1;