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

Create multiple artboards from a CSV File

Explorer ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

Hello! 

I often have to create multiple artboards in photoshop, and I was asking myself if there wasn't a script or plugin allowing to create multiple artboards from a .CSV or excel file.

I am wasting so much time at creating art board at the right size, and naming them after their dimensions:

Ernesto2813275668xg_1-1707219289098.png

 

I am aware something like this is possible in illustrator, from what I have seen in another thread:
https://community.adobe.com/t5/illustrator-discussions/question-creating-artboards-at-different-size...

The same would exist for photoshop ?


Thank you for your upcoming answers

TOPICS
Actions and scripting , macOS

Views

2.7K

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 2 Correct answers

Community Expert , Feb 07, 2024 Feb 07, 2024

CSV stands for Comma Separated Value, not Semicolon Separated Value! :]

 

I understand that in different countries different separators are used and that separators are not universal, however, the original script was only built to accept commas or colons.

 

If using semicolons suits your workflow better, then the script can be altered...

 

From:

 

var data = curRow.split(/,|:/);

 

 

To:

 

var data = curRow.split(/,|:|;/);

 

 

NOTE: The actual names/width/height content must not contain such char

...

Votes

Translate

Translate
Adobe
Community Expert ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

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
Engaged ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

From the code at that link:

Davide_Barranca_0-1707227368242.png

I'll put that in my LinkedIn profile 😄 

Davide Barranca - PS developer and author
www.ps-scripting.com

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 ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

Thank you for your answer, I might have been wrong when I spoke about scripts... I was thinking about "actions", ahhaha…
But I will try to learn about scripts… In another hand, where can I link the .csv file to be read by the script ?
(Sorry if I am not clear, english is not my mothertongue)
Thank you again for your time and answer!

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 Expert ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

@Ernesto TK 


Actions can be used to automate artboard setup, but not from CSV file.

 

More on saving and running scripts here:

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

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 ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

Thank you very 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
Community Expert ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

You're welcome!

 

Just a note that the script linked above doesn't use a CSV, the artboards are hard-coded into the script as an array:

 

 

//banner sizes /,
var sizes = [[60,600],[225,265],[450,100],[478,235],[620,540],[620,540],[640,340],[640,340],[851,315],[900,200],[1200,628],[1200,717],[1242,250],[1260,420],[1350,300],[1434,220],[1474,180],[1500,500],[1800,400],[2500,350]];

 

 

I tried in v2021 and 2024 and the scripts fail with an error.

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 Expert ,
Feb 06, 2024 Feb 06, 2024

Copy link to clipboard

Copied

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 ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

THANK YOU VERY MUCH! 

It is greatly appreciated! The artboard renamer script, is fire too!
I just have an issue with the artboard from csv script, when launching it, nothing seems to happen!
Here is a screen record of me doing it:

Thank you again you are the greatest!

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 Expert ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

What happens with no doc open?

 

Looks like one needs an open doc! Just have a layer, no existing artboard.

 

Flattened Background layers are converted to a fill layer (other layer kinds appear to remain as they were), only the first artboard receives a layer, and the others are empty.

 

ab.png

 

The next question is, what else, if anything needs to be automated after the script is run? I.E. Remove or replace the single layer? Add layers to the other 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
Explorer ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

Still nothing, that's weird:
What could'ive done wrong ?
Here is another screen record
Thank you again for your precious time!

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 Expert ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

Rather than using the "Quick Look" feature to show the contents of the CSV, can you open it in TextEdit.app or BBEdit.app or another plain text app and post a screenshot?

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 ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

Here it is! Maybe it's the comma/semi-colon, that's causing an issue

ErnestoTK_0-1707305396468.png

 

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 ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

IT WORKED! 
THANK YOU A LOT!

ErnestoTK_0-1707305621466.png

 

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 Expert ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

CSV stands for Comma Separated Value, not Semicolon Separated Value! :]

 

I understand that in different countries different separators are used and that separators are not universal, however, the original script was only built to accept commas or colons.

 

If using semicolons suits your workflow better, then the script can be altered...

 

From:

 

var data = curRow.split(/,|:/);

 

 

To:

 

var data = curRow.split(/,|:|;/);

 

 

NOTE: The actual names/width/height content must not contain such characters!

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 ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

Perfect! Thank you very much, I changed the line in the .jsx and it works perfectly with my .CSVs!
Thank you again! I will be way faster at work now! Have a wonderfull day!

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 ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

Can I ask you a last question; what line in the code can I change if want to have horizontal spacing rather than vertical ? Is it even possible ?
Thank you again! I used it today and it definetely saved me a great amount of time time!

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 Expert ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

It's possible to change the vertical layout to horizontal, but the edit isn't as simple as you may hope.

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 ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

Thanks for answering!
I think I will stick to the alignement pannel to reorganize the artboards, then…It is not a big issue 🙂

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 Expert ,
Feb 07, 2024 Feb 07, 2024

Copy link to clipboard

Copied

If you can demonstrate how this would work, then it may be easier for me to make an action or script to run afterwards.

 

Perhaps somebody else can offer a revised code snippet to layout the CSV data horizontally...

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 ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

I got confused, because I thought that as in Indesign you had a spacing option between pages/artboards. But I forgot that photoshop doesn't offer it, so I think it will be difficult to create an action after having created the artboards.
Because I have to move the artboard manually then space them and align. If there was a spacing option like in indesign, something automated would be possible… but unfortunately I have to select artboards manually + space them manually. (Does that make sense ?)

Here is a screen record:

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 Expert ,
Feb 08, 2024 Feb 08, 2024

Copy link to clipboard

Copied

Is there an actual, unequivocal rule that governs the intended distribution of the 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
Community Expert ,
Feb 09, 2024 Feb 09, 2024

Copy link to clipboard

Copied

quote

Is there an actual, unequivocal rule that governs the intended distribution of the Artboards? 


By @c.pfaffenbichler

 

At a starting point, I would think that just changing the current code from vertical to horizontal would be enough, as it already has the distribution and spacing. I'm just challenged with the complexity of the seemingly simple original code.

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 Expert ,
Feb 10, 2024 Feb 10, 2024

Copy link to clipboard

Copied

I wonder whether the OP might have some completely different arrangement than one column/one line in mind. 

Like an ultimately roughly square or landscape arrangement of all the artboards to make better use of the screen real estate. 

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 Expert ,
Feb 10, 2024 Feb 10, 2024

Copy link to clipboard

Copied

Yes, that's a good point, I have seen requests for making a grid N across and N down. Perhaps easier to do if all the artboards are the same size, probably harder if they are all random sizes and orientations. I really hate working with 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