In an Illustrator script, I want to enable the "Paste Remembers Layers" option which is located in the Layers panel's flyout menu.

Apparently this can be achieved in InDesign and its Application object has app.menuActions property for geting menus and then executing them but Illustrator has a different app.executeMenuCommand function which receives a string and executes a menu item. After searching references for menu strings like this one , I couldn't find a corresponding string for "Paste Reembers Layers". Also the app object has a pasteRemembersLayers property which is read-only and is used to check whether the option is enabled or not.

Until finding a solution, I've resorted to checking the app.pasteRemembersLayers property and alert the user to enable the option when it's false.

Also I found a similar question that had no good answer and also my question expands a little more on the siuation.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.