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

create document from template

Contributor ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

Hi

how to perform the create new from template functionality using script in illustrator.createDoc.png

TOPICS
Scripting

Views

433

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 ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

Just have the script open a file with extension ".ait". To open a regular file with a template, you may temporarily rename the file from ".ai" to ".ait" and do the regular open command, then rename original file back, or simply create a copy of this file for future use. Other than the ".ait" extension, absolutely nothing else had to be different about your template file in order to cause Illustrator to open such a file as an untitled new document.

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
Contributor ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

thanks for your reply. my need is to open a existing document with app.addDocumentNoUI() method

is it possible?

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
Valorous Hero ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

See my explorative work added to this thread:

Play with addDocumentNoUI

The addDocumentNoUI method only accepts a startupPreset name string, and even then it appears to only open the "Web" new document profile .ai file. Unfortunately there's not even an app.openNoUI method available.

However as I've tested out, it is possible to include custom symbols in the "Web" new document profile file, and put it to use in the NoUI context. It may be the case that the NoUI workflow has to utilize various methods to bring in pre-made (template) art from other sources. As Ten A  notes, it's not possible to duplicate or copy items from "YesUI" to NoUI documents, but it may be possible to add new placed items or use methods such as GroupItems.createFromFile( imageFile ) which could populate such a document with editable assets.

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 ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

LATEST

Great!

It's very helpful. (^-^)/

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