How to set transparency grid colour when creating a document via ExtendScript?
Hello!
I'm trying to set the transparency grid to "Medium" when creating a new Illustrator document via ExtendScript, but I'm unable to get it working. According to the scripting documentation, the DocumentTransparencyGrid.TransparencyGridMedium constant exists, but I'm unsure of the correct property or method to use it with.
What I've tried:
var docPreset = new DocumentPreset(); docPreset.units = RulerUnits.Centimeters; docPreset.width = 368.504; // 13cm in points docPreset.height = 963.78; // 34cm in points docPreset.colorMode = DocumentColorSpace.CMYK; docPreset.transparencyGrid = DocumentTransparencyGrid.TransparencyGridMedium; var newDoc = app.documents.addDocument("Print", docPreset);
I've also tried setting it directly on the document after creation:
newDoc.transparencyGrid = DocumentTransparencyGrid.TransparencyGridMedium;
Question: Is it possible to set the transparency grid color programmatically in ExtendScript, and if so, what is the correct syntax?
Apologies if this is simple or I have missed something, I am not too familiar with ExtendScript.
Any help would be greatly appreciated!
Thanks!
