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

Automate dataset import process (action, script, other)

Explorer ,
Dec 20, 2019 Dec 20, 2019

Hello, I'm looking for a way (action, javascript, other), to import an existing csv file into Photoshop to be used as a dataset. I'm aware this cannot be done through Photoshop's traditional actions, and have looked into other possiblities including a python script but can't seem to figure it out. Surely, someone out there has programmatically imported a dataset? Any help is very much appreciated, as this would be a huge time saver for what I'm doing! Thanks!

TOPICS
Actions and scripting
1.6K
Translate
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
Adobe
Community Expert ,
Dec 20, 2019 Dec 20, 2019

Search for a tutorial on Photoshop Data Driven Graphics.

 

If Photoshop Data Driven Graphics is not what you want a Photoshop Script can read and Process a CVS file. However you need to be a good JavaScript  programmer and Photoshop DOM does not cover all of Photoshop functions. Photoshop Scripts need to also use Action Manager Code when Programming a Script Process. You need to know how Photoshop works very well. 

 

Python scripting is not supported by Adobe Photoshop's Scriptingsupport Plug-in.   I have read some Python support has been created by some but I do not know the details. What is supported is VBS, Apple Script and JacaScript.  Even Apple Script Photoshop scripts need to use some JavaScripting in apple script.   Javascript is the best option for it is supported one both Windows and OSX.  The are some differences between Microsoft OS and Apple OS file system support that need to be address in some scripts.

JJMack
Translate
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 ,
Dec 20, 2019 Dec 20, 2019

I've done this, however cannot find anything related to doing it programmatically external to Photoshop. I have written a few basic .jsx scripts for automating other processes in Photoshop and am open to this as well, but still can't find anything. 

Translate
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 ,
Dec 20, 2019 Dec 20, 2019

JavaScript has File system support and can execute application.  So a Photoshop script can read and write files and run  execute application and see if it create the output file script need to use and then process that file.

 

If you use Google you can search this site for Scripts that process CSV files. Do not try to use this site search up top its useless.

 

Templates and CSV files may be all that you need Photoshop Data Driven Graphics Tutorials 

JJMack
Translate
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 ,
Dec 20, 2019 Dec 20, 2019

Yes, I'm able to open Photoshop and the specific psd file through my Python script (could also be done in JS). Where I'm stuck, however, is the part of importing the dataset. I know how this works within Photoshop (Image > Variables > Data Sets), but I need this done programmatically.  

Translate
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 ,
Dec 21, 2019 Dec 21, 2019
LATEST

I haven't worked with data set, but could you use scriptListener to record the code then modify it according to you csv file? Opening a csv file in PS is fairly easy, and there are many examples of opening those files, then putting the contents into an array. Once you get the array, you can do whatever you want with that data.

Translate
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