create document from template
Copy link to clipboard
Copied
Hi
how to perform the create new from template functionality using script in illustrator.
Explore related tutorials & articles
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.
Copy link to clipboard
Copied
thanks for your reply. my need is to open a existing document with app.addDocumentNoUI() method
is it possible?
Copy link to clipboard
Copied
See my explorative work added to this thread:
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.
Copy link to clipboard
Copied
Great!
It's very helpful. (^-^)/
![](/skins/images/1A2984DC5E3889F4435E998DD71294F3/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/1A2984DC5E3889F4435E998DD71294F3/responsive_peak/images/icon_anonymous_message.png)