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

Set/unset layer as template

Guest
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

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?

TOPICS
Scripting

Views

507

Translate

Translate

Report

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
Valorous Hero ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Guest
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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 ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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