Skip to main content
December 30, 2025
Question

How to set transparency grid colour when creating a document via ExtendScript?

  • December 30, 2025
  • 5 replies
  • 469 views

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!

5 replies

Inspiring
January 7, 2026

After a lot of testing, I have found that scripting is consistently useful only for manipulating the document, not the workspace.

 

It is not possible to expand layers, for example.

January 4, 2026

Hi all!

 

Unfortunately it's clear that it is not possible to change the transparency grid with ExtendScript. Thank you all so much for your replys!

CarlosCanto
Community Expert
Community Expert
January 4, 2026

If I understood correctly, what @Svija implied is that it used to work in older versions like v9?

 

it's clear it doesn't work now.

pixxxelschubser
Community Expert
Community Expert
January 2, 2026

Hi @freddie_1031 
Unfortunately, the transparency grid has not worked with a script for many years.

But perhaps you could open your new document based on a transparent document and change the “other” values.

 

var aDoc = documents.addDocument( "Film und Video", /*myPreset*/); // this is the German string

 

CarlosCanto
Community Expert
Community Expert
January 7, 2026
quote

Hi @freddie_1031 
Unfortunately, the transparency grid has not worked with a script for many years.

But perhaps you could open your new document based on a transparent document and change the “other” values.

 

var aDoc = documents.addDocument( "Film und Video", /*myPreset*/); // this is the German string

 


By @pixxxelschubser

 

 

ohhhh dumb me, It didn't work with the German text Lol

 

I found one of my old notes, it does work, the english string should be "Film & Video"

pixxxelschubser
Community Expert
Community Expert
January 7, 2026

Hi Carlos
😉
Does this help you find the string in your language more easily?

var presetsList = [];
  for (i = 0; i < startupPresetsList.length; i++) {
    presetsList[i] = [ i, startupPresetsList[i] ];
  }
  alert("Index list\r\r"+presetsList.join('\r'));


 

January 2, 2026

Take a simple, empty Illustrator document, save it then change the extension to .txt.

 

When you open it, you'll have a list of settings, notably "%_1 /Int (AI9 transparency grid size)" — it's not an answer, but it might get you on the right track.

m1b
Community Expert
Community Expert
December 31, 2025

Hi @freddie_1031 I did some quick testing and couldn't make that enum do anything. But my ignorance goes even further: I don't even know where to edit the Transparency Grid via the UI. Do you know?

 

I get the impression that Adobe might have deprecated it at some time and it doesn't do anything these days. Maybe someone knowledgeable will know...

- Mark

Legend
December 31, 2025

Tried it too, and indeed nothing happened.

 

This can be checked under the following conditions:

  • Make it visible via “View > Show Transparency Grid
  • Set it in “File > Document Setup...

 

In the meantime, a workaround could be opening the file saved as a template (ait), but we probably want a fundamental solution.