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

Add Ref. No at starting of the custom artboard name

Contributor ,
Jul 31, 2022 Jul 31, 2022

Copy link to clipboard

Copied

Can we add Artboard Ref.no at starting of the each selected artboard name. I don’t want to lost given custom name. just to add Ref. No at starting of the custom artboard name

 

Add Artboard Ref. No at starting of the custom artboard name.png

TOPICS
Scripting

Views

724

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

Enthusiast , Jul 31, 2022 Jul 31, 2022

Maybe you will find this script useful. It has a lot more options https://github.com/creold/illustrator-scripts/blob/master/jsx/BatchRenamer.jsx
batch-renamer.gif

Votes

Translate

Translate
Adobe
Enthusiast ,
Jul 31, 2022 Jul 31, 2022

Copy link to clipboard

Copied

Maybe you will find this script useful. It has a lot more options https://github.com/creold/illustrator-scripts/blob/master/jsx/BatchRenamer.jsx
batch-renamer.gif

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 ,
Jul 31, 2022 Jul 31, 2022

Copy link to clipboard

Copied

Wow, Great, absolutely working

Sergey Osokin, you given me lot lot than I was expecting.

Thank you so much 🙂

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 ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Hello Sergey Osokin,

How to define color for Numbers as you shown in animation?

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
Enthusiast ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

I added a variable with color to the function. This improvement is not available on GitHub

function showAbIndex(doc, lyrName) {
  var tmpLayer;
    
  try {
    tmpLayer = doc.layers.getByName(lyrName);
  } catch (e) {
    tmpLayer = doc.layers.add();
    tmpLayer.name = lyrName;
  }

  var color = new RGBColor();
  color.red = 255;

  for (var i = 0, len = doc.artboards.length; i < len; i++)  {
    doc.artboards.setActiveArtboardIndex(i);
    var currAb = doc.artboards[i],
        abWidth = currAb.artboardRect[2] - currAb.artboardRect[0],
        abHeight = currAb.artboardRect[1] - currAb.artboardRect[3],
        label = doc.textFrames.add(),
        labelSize = (abWidth >= abHeight) ? abHeight / 2 : abWidth / 2;
    label.contents = i + 1;
    // 1296 pt limit for font size in Illustrator
    label.textRange.characterAttributes.size = (labelSize > 1296) ? 1296 : labelSize;
    label.textRange.characterAttributes.fillColor = color;
    label.position = [currAb.artboardRect[0], currAb.artboardRect[1]];
    label.move(tmpLayer, ElementPlacement.PLACEATBEGINNING);
  }

  redraw();
}

 

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
Enthusiast ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Uploaded a new version to Github, where you can set the index color in "CFG.idxColor: [255, 0, 0]"

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 ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Thank You so much, this will save time to review pages while renaming the artboards at complex artwork

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
Community Beginner ,
Sep 06, 2022 Sep 06, 2022

Copy link to clipboard

Copied

How can this be run in Adobe Illustrator? I'm new to using scripts.

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
Community Beginner ,
Sep 06, 2022 Sep 06, 2022

Copy link to clipboard

Copied

Disregard! I found the installation instructions. Apologies for asking too quick

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
Participant ,
Apr 19, 2023 Apr 19, 2023

Copy link to clipboard

Copied

hello sergey, very useful script, like all the ones you've created, but I don't understand why only the "find/replace" function works for me, however very useful. Unfortunately I can't use the "suffix/prefix" functions instead, nothing happens, it doesn't behave like in your example. Probably I'm doing something wrong... Thanks in advance
------
sorry... I found out now that surely it's my machine that has problems (macOS Mojave + illustrator 25.4.8), I tried it on another more up-to-date computer with macOS monterey and illustrator 27.4.1 and everything works perfectly!, sorry again for the hasty request...



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
Enthusiast ,
Apr 19, 2023 Apr 19, 2023

Copy link to clipboard

Copied

Can you record a gif, mp4 example? Which version of the script are you using? You can send information in messages in my profile.

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
Participant ,
Apr 20, 2023 Apr 20, 2023

Copy link to clipboard

Copied

LATEST

Hi Sergey, I wrote you a message from your profile, however I discovered how to use it without errors, thanks again!

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
LEGEND ,
Aug 01, 2022 Aug 01, 2022

Copy link to clipboard

Copied

This would work:

function artboardRef() {
    var aDoc = app.activeDocument;
    for (i = 0; i < aDoc.artboards.length; i++) {
        var abName = aDoc.artboards[i].name;
        aDoc.artboards[i].name = (i + 1) + '_' + abName;
    }
}

artboardRef();

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 ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

Yes, Its working as expect. Thank you so much. 

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 ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

It will be great, if this script works only at selected artboards in the panel, is it possible ?

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
Enthusiast ,
Aug 02, 2022 Aug 02, 2022

Copy link to clipboard

Copied

No. Selected layers and artboards in panels are used by the user for manual movement, but this selection is not available to the API.

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 ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

Its OK, but you solved my Big problem of Renaming Artboards 

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