Skip to main content
October 16, 2017
Question

Set/unset layer as template

  • October 16, 2017
  • 2 replies
  • 821 views

Hi all,

I'm writing a script that enables/disables a layer as a Template layer.

In the Illustrator scripting reference (2017), I see the properties and methods I can access for Layer objects.

It states other booleans such as 'printable', but not 'template' or 'isTemplate' which are accessible (not read-only).

Is it possible to set/unset a layer as template layer through script?

This topic has been closed for replies.

2 replies

Inspiring
October 27, 2024

one more option to use layer as template is 

templateLayer.printable = false;
Silly-V
Legend
October 16, 2017

It does not look like the template property is listed in the scripting commands, but you can record a dynamic action to play, which could make a new template layer with your settings you desire.

Writing a dynamic action is just one of those things us Illustrator scripters have to do in order to work around Illustrator scripting's limitations or bugs!

Creating a dynamic action to use with app.doScript() method.

October 17, 2017

I see.

Do I understand correctly if the doScript method is only available if the Illustrator script is in VB?

Mine is in javascript (currently) and neither can I find a reference to doScript in the scripting reference.

Meaning I should convert my script to VB to use doScript?

Disposition_Dev
Legend
October 17, 2017

you can use app.doScript() in javascript with no problem. The only limitation is that you must be using Illustrator CS6 or above