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

Redimension lots of objects (circles) separately

New Here ,
Nov 24, 2017 Nov 24, 2017

Copy link to clipboard

Copied

Hi everyone !

This question may have already been answered, but I didn't find any.

Here is my issue : I'd like to selection a lot of different object (which are circles) and redimension each of them separately to 10px (they are at 13 px right now)

Someone told me I should use a script, but I don't know how, does anyone could help me with that ?

Thank you for your kindness

TOPICS
Scripting

Views

330

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

Contributor , Nov 25, 2017 Nov 25, 2017

Hi,

Is "redimension" mean resizing?

It is easy to resize each object. But It is difficult for me to align pixel grid after resizing via script. If you create something like an icon for web, you may need it.

The following script resize each selected object (excluding stroke width).

If your work is like this, try:

(function () {

    if (app.documents.length === 0) {

        return;

    }

   

    var doc = app.activeDocument,

        sel = doc.selection,

        size = new UnitValue(10, "px").as("pt"),

       

...

Votes

Translate

Translate
Adobe
Contributor ,
Nov 25, 2017 Nov 25, 2017

Copy link to clipboard

Copied

Hi,

Is "redimension" mean resizing?

It is easy to resize each object. But It is difficult for me to align pixel grid after resizing via script. If you create something like an icon for web, you may need it.

The following script resize each selected object (excluding stroke width).

If your work is like this, try:

(function () {

    if (app.documents.length === 0) {

        return;

    }

   

    var doc = app.activeDocument,

        sel = doc.selection,

        size = new UnitValue(10, "px").as("pt"),

        i,

        max;

   

    for (i = 0, max = sel.length; i < max; i += 1) {

        if (sel.hasOwnProperty("resize")) {

            sel.resize(size / sel.width * 100, size / sel.height * 100);

        }

    }

}());

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
New Here ,
Nov 25, 2017 Nov 25, 2017

Copy link to clipboard

Copied

Thank you for your answer, I will try it as soon as I learn how to use scripts in Illustrator !

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
Contributor ,
Nov 29, 2017 Nov 29, 2017

Copy link to clipboard

Copied

LATEST

Hello!

Did you know how to use the script?

Copy and paste this code using a text editor and save it as a text file with the name of "favoriteName.jsx".

Launch Illustrator and navigate File > Scripts > Other Script and choose the file "favoriteName.jsx".

Then the script is executed.

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