Skip to main content
Participant
February 19, 2008
Question

Undo Doesn't Undo createOutline?

  • February 19, 2008
  • 5 replies
  • 762 views
I needed to get the position of text but much tighter on the text itself than the TextFrame.position property. So I created a function to "explode" each text frame to outlines, then capture the XY coordinates. However, after exploding, I want to return it back to text so I used the app.undo() but it doesn't appear to undo. I also tried just undo() without the app. in front of it.

Can anyone explain why the undo doesn't undo the outlining?

function tightCoord(oTextFrame)
{
//pass in a TextFrame object, explode it, and return the top left coord
oGroup = oTextFrame.createOutline();
//capture the "tight" x,y coordinates
strCoords =strPicasToInches(oGroup.top) + ", " + strPicasToInches(oGroup.left);
app.undo();
return "ExplodedTopLeft: " + strCoords;
}
This topic has been closed for replies.

5 replies

Participant
April 10, 2008
I'm using Adobe Illustrator CS3. There is nothing under Illustrator Edit pulldown menu that lists any commands? Can you clarify?
Known Participant
March 18, 2008
>Neither the AS or JS documentation lists any method which corresponds to the Undo command from the menu items

Yes, it does. Works here, too. (CS3)

dog,
when you stop the script after the line
strCoords =strPicasToInches(oGroup.top) + ", " + strPicasToInches(oGroup.left);

and look in the edit-menu, which command is listed there?

Try troubleshooting by inserting several undos.
Participant
March 8, 2008
Thanks
frax_-L75d7K
Known Participant
March 3, 2008
or duplicate the text, create outlines and explode on the duplicate, then delete that when you are done (leaving the original intact)
Larry G. Schneider
Community Expert
Community Expert
February 19, 2008
Neither the AS or JS documentation lists any method which corresponds to the Undo command from the menu items. You may need to copy the text to the clipboard, run your function, delete the expanded items and repaste the copied text from the clipboard.