Illustrator Save File

I think there is a bug with versions of Illustrator newer than 2021. I can’t get a document to save!
Anyone have any idea how to get the following to work, or any workarounds?

tell application "Adobe Illustrator"
	set the filepath to file path of current document
	
	save current document in filepath as Illustrator with options {class:Illustrator save options, compatibility:Illustrator 24, embed ICC profile:true, save multiple artboards:false, PDF compatible:false}
end tell

In your snippet, there is a conflict between compatibility and PDF compatible parameters.
If you’re using a recent version of Illustrator, compatibility is by default set to Illustrator 24.
Setting the class when setting properties is never needed.
And finally, if your goal is to save the current document, you don’t need the in parameter.
Therefore, you code should be:

tell application "Adobe Illustrator"
	save current document as Illustrator with options {embed icc profile:true, save multiple artboards:false, PDF compatible:false}
end tell
2 Likes

Thank you ionah – your edits worked!