• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to automate "Fit to Artwork Bounds"?

Explorer ,
Mar 13, 2017 Mar 13, 2017

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.

TOPICS
Scripting

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 13, 2017 Mar 13, 2017

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.

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 13, 2017 Mar 13, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 02, 2019 Jun 02, 2019

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines