Link in Zwischenablage kopieren
Kopiert
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:
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
Try these:
https://github.com/creold/photoshop-scripts
https://cdn.statically.io/gh/creold/photoshop-scripts/master/jsx/ArtboardsFromCSV.jsx
https://cdn.statically.io/gh/creold/photoshop-scripts/master/jsx/RenameArtboardAsSize.jsx
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
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
...Link in Zwischenablage kopieren
Kopiert
Link in Zwischenablage kopieren
Kopiert
From the code at that link:
I'll put that in my LinkedIn profile 😄
Link in Zwischenablage kopieren
Kopiert
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!
Link in Zwischenablage kopieren
Kopiert
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
Link in Zwischenablage kopieren
Kopiert
Thank you very much!
Link in Zwischenablage kopieren
Kopiert
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.
Link in Zwischenablage kopieren
Kopiert
Try these:
https://github.com/creold/photoshop-scripts
https://cdn.statically.io/gh/creold/photoshop-scripts/master/jsx/ArtboardsFromCSV.jsx
https://cdn.statically.io/gh/creold/photoshop-scripts/master/jsx/RenameArtboardAsSize.jsx
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Link in Zwischenablage kopieren
Kopiert
Link in Zwischenablage kopieren
Kopiert
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.
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?
Link in Zwischenablage kopieren
Kopiert
Link in Zwischenablage kopieren
Kopiert
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?
Link in Zwischenablage kopieren
Kopiert
Here it is! Maybe it's the comma/semi-colon, that's causing an issue
Link in Zwischenablage kopieren
Kopiert
IT WORKED!
THANK YOU A LOT!
Link in Zwischenablage kopieren
Kopiert
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!
Link in Zwischenablage kopieren
Kopiert
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!
Link in Zwischenablage kopieren
Kopiert
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!
Link in Zwischenablage kopieren
Kopiert
It's possible to change the vertical layout to horizontal, but the edit isn't as simple as you may hope.
Link in Zwischenablage kopieren
Kopiert
Thanks for answering!
I think I will stick to the alignement pannel to reorganize the artboards, then…It is not a big issue 🙂
Link in Zwischenablage kopieren
Kopiert
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...
Link in Zwischenablage kopieren
Kopiert
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:
Link in Zwischenablage kopieren
Kopiert
Is there an actual, unequivocal rule that governs the intended distribution of the Artboards?
Link in Zwischenablage kopieren
Kopiert
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.
Link in Zwischenablage kopieren
Kopiert
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.
Link in Zwischenablage kopieren
Kopiert
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! :]
Weitere Inspirationen, Events und Ressourcen finden Sie in der neuen Adobe Community
Jetzt ansehen