Skip to main content
j.khakase
Inspiring
August 1, 2022
Answered

Add Ref. No at starting of the custom artboard name

  • August 1, 2022
  • 2 replies
  • 1851 views

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

 

This topic has been closed for replies.
Correct answer Sergey Osokin

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

2 replies

rcraighead
Legend
August 1, 2022

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();
j.khakase
j.khakaseAuthor
Inspiring
August 3, 2022

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

Sergey Osokin
Sergey OsokinCorrect answer
Inspiring
August 1, 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

Known Participant
April 19, 2023

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...



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

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