Skip to main content
This topic has been closed for replies.

1 reply

Silly-V
Legend
March 13, 2018

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.

Inspiring
March 13, 2018

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

is it possible?

Silly-V
Legend
March 13, 2018

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.