creold / illustrator-scripts

Some powerfull JSX scripts for extending Adobe Illustrator
MIT License
644 stars 110 forks source link

DuplicateToArtboards.jsx Is malfunctioning in Illustrator CC 2023 (27.4.1) #12

Closed futuremotiondev closed 1 year ago

futuremotiondev commented 1 year ago

See this video:

https://user-images.githubusercontent.com/33441569/233846064-721218be-7a3c-462b-85b5-603e87255e74.mp4

When Preserve Layers is disabled, the script just does nothing. Is this intended?

Really appreciate your work on all of the scripts available here.

Jay

creold commented 1 year ago

This error is related to running the script through an action. The objects are copied, but they are copied to a temporary layer with artboard indexes, and when you close the script, that layer is deleted along with the objects.

Try this hotfix https://gist.github.com/creold/a40354a83c6323a9f78ab02efa9e77e2

futuremotiondev commented 1 year ago

Awesome! That worked great.

I have one more issue with one of your scripts: FitSelectionToArtboards.jsx

It only works if the geometry is completely outside of the artboards. If each artboard has geometry, the script does nothing.

See this video for a better demonstration:

https://user-images.githubusercontent.com/33441569/234197200-70128574-e87f-4152-8017-ccc224d2c842.mp4

Sorry for pestering! But a hot-fix for this script too would be nice! 😍

creold commented 1 year ago

What you need in this video is a different script. FitSelectionToArtboards places the selected objects sequentially on empty artboards in the order they are arranged in the Layers panel. In the video, you need to fit the contents of each artboard to its dimensions. For example, a small dropdown icon should fit on a small artboard. There is no such script in my collection.