Highlighted

Is it possible to Ungroup graphics with code?

New Here ,
Mar 03, 2016

Copy link to clipboard

Copied

Hi Group,

I've been trying to find a way to ungroup graphics within an anchored frame. Can't find a method to do this.

Maybe going inside a group, grabbing the group components, saving them somewhere, deleting the group and recreating the components in its original positions.

if (oGraphic2.type = Constants.FO_Group){ //graphic is a group

    alert("Graphic selected is a group.");

    //do something to Ungroup the group

}

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

All you have to do is delete the Group object:

#target framemaker

var doc = app.ActiveDoc;

var graphic = doc.FirstSelectedGraphicInDoc;

var group = graphic.GroupParent;

if (group.constructor.name === "Group") {

    group.Delete ();

}

-Rick

TOPICS
Scripting

Views

345

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Is it possible to Ungroup graphics with code?

New Here ,
Mar 03, 2016

Copy link to clipboard

Copied

Hi Group,

I've been trying to find a way to ungroup graphics within an anchored frame. Can't find a method to do this.

Maybe going inside a group, grabbing the group components, saving them somewhere, deleting the group and recreating the components in its original positions.

if (oGraphic2.type = Constants.FO_Group){ //graphic is a group

    alert("Graphic selected is a group.");

    //do something to Ungroup the group

}

Adobe Community Professional
Correct answer by frameexpert | Adobe Community Professional

All you have to do is delete the Group object:

#target framemaker

var doc = app.ActiveDoc;

var graphic = doc.FirstSelectedGraphicInDoc;

var group = graphic.GroupParent;

if (group.constructor.name === "Group") {

    group.Delete ();

}

-Rick

TOPICS
Scripting

Views

346

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 03, 2016 0
Adobe Community Professional ,
Mar 03, 2016

Copy link to clipboard

Copied

All you have to do is delete the Group object:

#target framemaker

var doc = app.ActiveDoc;

var graphic = doc.FirstSelectedGraphicInDoc;

var group = graphic.GroupParent;

if (group.constructor.name === "Group") {

    group.Delete ();

}

-Rick

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2016 0
funsekon LATEST
New Here ,
Mar 03, 2016

Copy link to clipboard

Copied

Thanks Rick, that worked perfectly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 03, 2016 0