Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Dec 30, 2025 Dec 30, 2025

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!

TOPICS
How-to , Scripting
409
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Dec 30, 2025 Dec 30, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 31, 2025 Dec 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2026 Jan 02, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2026 Jan 02, 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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2026 Jan 07, 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"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2026 Jan 07, 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'));


 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 07, 2026 Jan 07, 2026
LATEST

Hi pixxxel, I know the right string. I carelessly copied your same "as is", I didn't realize the preset was in German.

 

thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 04, 2026 Jan 04, 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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2026 Jan 04, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2026 Jan 04, 2026

??

You can't change it, but you can set it with the ‘right’ template. Have you tried it (see my previous post)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 07, 2026 Jan 07, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines