Skip to main content
Known Participant
October 31, 2017
Question

ExportOptionsPhotoshop auto-adding artboard name to filenames

  • October 31, 2017
  • 1 reply
  • 979 views

Hello!

I'm currently working on a small script that exports a specific artboard from a number of Illustrator-files to Photoshop.

Lets say we have 4 files:

Illustrator1.ai, Illustrator2.ai, Illustrator3.ai and Illustrator4.ai

I'd expect the script (given that I've coded it to have the same placement and name as the input files, but with as different extension) to output this:

Illustrator1.psd, Illustrator2.psd, Illustrator3.psd, and Illustrator4.psd

Instead it outputs:

Illustrator1-NameofArtboard1.psd,Illustrator2-NameofArtboard2.psd,Illustrator3-NameofArtboard3.psd and Illustrator4-NameofArtboard4.psd,

Is that working as intended? I'm using the default "ExportOptionsPhotoshop" settings, with only SaveMultipleArtboards and artboardRange being edited. For some reason, it insists on adding the name of the artboard to the filename.

Thanks in advance,

Thomas

This topic has been closed for replies.

1 reply

Known Participant
October 31, 2017

Forgot to add the line that does the actual exporting:

app.activeDocument.exportFile( fileSpec, type, exportOptions );

fileSpec is just a string containing the file and foldername (which is correct and can be verified via alert())

type is "ExportType.PHOTOSHOP"

and exportOptions is as written above

Silly-V
Legend
October 31, 2017

I think the fileSpec should be an actual File() object, according to the OMV. But, it seems to be working for you - so , next is its artboard naming behavior: the SaveMultipleArtboards will save each artboard as a separate file. I do not think it does what you may wish: which is to have the Illustrator artboards turn into Photoshop artboards and still remain a single file?

Known Participant
October 31, 2017

Sorry - the fileSpec is indeed a File object (defined as such: var fileSpec = new File(targetFile);). It wasn't entirely clear in my previous post!

Basically, what I need is for the script to export a specific artboard (artboard 3) to a PSD-file. IE. I have 100 Illustrator-files, where I need to export artboard 3 to 100 new Photoshop-files (one for each artboard).

I'm just curious as to why the "exportFile" function seems to add the artboard-name to the file name