New Artboard Paste in Front Fails and Select Artboard Fails in Artboards panel
Illustrator 29.6.1 - Mac
When starting with more than one artboard.
If you select all objects on an artboard. Copy.
Then make a new identical artboard in another position to the artboard you copied artwork from, you cannot select the new artboard and paste in front.
I suspect it is a bug how illustrator keeps track of how many artboards it has because the name is always artboard [number] and the new artboard number in the name is always incorrectly one higher than the actual number.
You can no longer select an artboard in the Artboards panel and select objects you create on the new artboard using Select All on active artboard.
This creates a problem in Extendscript or AppleScript because you can no longer set the active artboard correctly and have it display properly even with redraw. This bug does not occur in 29.5
-
Dean Marshall commented
Egor
In regards to "deselecting an artboard", I usually do something like make active artboard 1 in AS or 0 in Extendscript, neither seem to work very well now,. make sure nothing is selected and then make the active artboard the one I want to do something like paste in front or select all on active artboard on. But this doesnt work or resolve the issue anymore. When making artboards via script the default name is usually the Artboard number and it is usually the wrong number in the latest updates if that helps point you in the right direction for fix. -
Sergey Osokin commented
I recorded when the problem occurs and how I have to check through the Artboard Tool that the current artboard is not selected by a frame before running the script.
-
Sergey Osokin commented
I confirm. Since when creating a new artboard both the old and the new are "selected", the Paste in Front command now thinks that the user wants to paste from the clipboard to all these artboards. But this is done by a script and another process is expected there. A serious logical conflict has appeared between the new behavior of the Paste in Front command and scripts.
Now, to avoid this problem, the user must, before running the script,
1) enter the Artboard Tool
2) click anywhere on the canvas to remove the selection frame from the current artboard
3) run the script to create a new artboard and insert Paste in Front
But this is bad. The user must remember this instruction and follow it every time before running the script -
I see what’s going on here.
I tested the ES one with a document with a single artboard (it still is affected).
I commented out the line 27 (app.executeMenuCommand("pasteFront");), to handle pasting myself — when Paste in Front was used, I got copies at both artboards.
And then it clicked me... I picked Artboard tool and I see both artboards selected. Even though the second artboard is now active, the script never told Ai to deselect the first one — and Ai now allows Paste operations at all selected artboards, following this request: http://illustrator.uservoice.com/forums/333657/suggestions/32146360
But AFAIK there is no method in scripting to select or deselect artboards, it was never a thing we needed to care about...
So this IS a problem!I’ll try to find out what is the state of things.
Thanks for the report and the patience. -
Dean Marshall commented
Here are the scripts in Applescript and Extendscript
-
Dean Marshall commented
Attached are both AS and Extendscripts that show the issue. Start with 2 artboards and make sure first artboard has contents on it.
heres a loom of the extendscript
https://www.loom.com/share/620317f027f74433b69e9177ed45ea6a?sid=8ad69bdf-017c-4df3-9d4e-52a2a956e812
loom of the AppleScript example:
https://www.loom.com/share/349f070ed366440dacc86a9c44064255?sid=10861d5d-6634-460c-9135-65e8a7562fc3
-
Yes, sure, please.
UserVoice won’t allow them to get attached as .js or .jsx due to the security reasons, but try renaming these into .txt or something else. -
Dean Marshall commented
it looks like manually doing this works. If I do it in extendscript or AppleScript it does it. Would you like me to post the scripts? It is definitely not a scripting error.
-
Nope, can’t make this happen with 29.6.1.
I start with two artboards in a new document, add some shapes to each one.
I select objects within the Artboard 1 (both manually, with a marquee, or Select > All on Active Artboard command), and Copy them.
I pick Artboard tool and create a new artboard, with the same size as the Artboard 1. It gets the name 'Artboard 3' — because I already have 2 of them.
I make sure it’s active and Paste in Front — it works and the copied objects land in the same relative position, above all other objects in the current Layer 1.How does it look for you?
Can you please record a video with the Artboards and Layers Panel visible?