Hi all,
On Illustrator CC 2017, there's some particular case become blocker.
I'm trying to work around path.
If there's anything I'm missing, please let me know.
I appropriate any feed backs.
Issue:
Manually operated Undo history got over written at following operation in script.
1) It is only Polygon object
All other object seems fine.
2) Undo history is by only manual operation
ex1) Placing Polygon object 10 time by mouse causes issue.
ex2) Placing Polygon object 10 time by script does not causes issue.
3) Redo issue is by only scripting
Illustrator UI works fine.
4) app.redraw() is actual trigger to delete undo history
If it is called from CEP plugin CSInterface.evalScript(), it seems has same issue.
My target environment is CEP plugin.
Test code |
---|
#target illustrator // open document before run /* // Following script operation works, but manual placing polygons have issue. // Place 10 polygon (Hexagon) for(var i = 0; i < 10; i++){ $.writeln("polygon: " + i); var a = 100 + i * 20; activeDocument.pathItems.polygon(a, -a, 10, 6); // Hexagon app.redraw(); $.sleep(1000); } */ for(var i = 0; i < 5; i++){ app.undo(); $.writeln("undo:" + i); app.redraw(); // no change $.sleep(1000); } app.redraw(); for(var i = 0; i < 5; i++){ // Only first redo works app.redo(); // app.executeMenuCommand("redo"); // same behavior $.writeln("redo:" + i); app.redraw(); // problem on Polygon redo // commenting out works, but document view won't be updated $.sleep(1000); } app.redraw(); |
|
Thank you,
Naoki