Save as CS6 from CC

Post Reply
aoswood
Member
Posts: 20
Joined: Wed Sep 14, 2011 6:16 pm

Save as CS6 from CC

Post by aoswood »

I am trying to make a quick "save as" flow to save down Creative Cloud Illustrator files to CS6.



I am pretty close, if I replace the path to the Desktop for the destination file, it will resave my file to the desktop. I thought if I replaced it with the $outfolder, it would place it in the output folder with the same file name. Instead the script just errors out.



iDoc=app.activeDocument;

var destfile = new File($outfolder);

var aisaveOptions = new IllustratorSaveOptions();

aisaveOptions.compatibility = Compatibility.ILLUSTRATOR16;

iDoc.saveAs (destfile, aisaveOptions);
aoswood
Member
Posts: 20
Joined: Wed Sep 14, 2011 6:16 pm

Save as CS6 from CC

Post by aoswood »

Ok this has got me a little closer, it will create the temp file on the desktop, but it will not move it to the final folder of the flow.



Failed to place job '_0CIP5_Untitled-1.ai' in folder 'Output'



$Doc=app.activeDocument;

var tempfile = new File("/Users/wfadmin/Desktop/" + $filename + ".ai");

var aisaveOptions = new IllustratorSaveOptions();

aisaveOptions.compatibility = Compatibility.ILLUSTRATOR16;

$Doc.saveAs (tempfile, aisaveOptions);



$outfiles = []

$outfiles.push(tempfile);

$doc.close;
freddyp
Advanced member
Posts: 1022
Joined: Thu Feb 09, 2012 3:53 pm

Save as CS6 from CC

Post by freddyp »

Do not set $doc to app.activeDocument, and certainly not $Doc.



It will work when you write the output to your Desktop, but it is cleaner to use $outfolder. Check the part on "Javascript for applications" in the Help to find an overview of all the variables you should use.



Freddy
Post Reply