Question
Undo Doesn't Undo createOutline?
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;
}
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;
}