Copy link to clipboard
Copied
Task is easy for first look.
I just need "Object" -> "Artboards" -> "Fit to Artwork Bounds" in script.
But can't find such function! Please, help me to find, if u know.
Assuming you have already made your selection, and assuming you're using CS6+, you can use:
app.activeDocument.fitArtboardToSelectedArt(0);
this will fit the first artboard (zero index) to the selected art. You can replace 0 with whatever index you want, so long as an artboard with that index exists.
Copy link to clipboard
Copied
Assuming you have already made your selection, and assuming you're using CS6+, you can use:
app.activeDocument.fitArtboardToSelectedArt(0);
this will fit the first artboard (zero index) to the selected art. You can replace 0 with whatever index you want, so long as an artboard with that index exists.
Copy link to clipboard
Copied
Your script is very good
Unfortunately, it won't create a new artboard.
And multiple objects cannot be created separately
Always create a range of objects for multiple selected objects