Skip to main content
Inspiring
Sep 23, 2017 2:35 PM UTC
Question

Play with addDocumentNoUI

var doc = app.documents.addDocumentNoUI();

$.writeln(app.documents.length) // 0

var t = doc.textFrames.add();

t.contents = doc.name;

t.selected = true;

$.writeln(t.selected) // true

$.writeln(doc.selection.length) // 1

/*

   

$.writeln(app.selection.length) // error, no such element

app.paste() // error, no documents are opened.

// and you can not duplicate or move items from visible document to the NoUI document.

app.redraw(); // crush!

*/

doc.saveNoUI(File('~/desktop/NoUI.ai'));

doc.closeNoUI();

$.hiresTimer; // It seems with NoUI mode, will take less executing time, need more tests.

This topic is closed to new replies. Start a new post to keep the conversation going.

9 replies

Silly-V
Legend
Sep 23, 2017 5:42 PM UTC

is this in the new version

Translate
moluappleAuthor
Inspiring
Sep 24, 2017 1:35 AM UTC
Silly-V
Legend
Mar 12, 2018 3:11 PM UTC

What are some cases this would be useful for? I was going to try to experiment with this, but then saw there is no option to open any existing document with NoUI. Such may of course either quicken Illustrator batch-processing or reduce some of the issues surrounding it. But, at this point it appears we shall never know. However, it is possible to add the NoUI documents with the new document presets - among which the various new document profiles could be chosen. Could these new document profiles potentially be abused for holding complex artwork within the symbols saved as the part of a new document profile? If so, then some NoUI batch processing could be accomplished with opening some new document profile, pulling down  a symbol or several symbols and obtaining artwork from them, then manipulating this artwork, and saving the output NoUI document. The test I would like to create is to add a symbol with some editable text into one of my new document profile .ai files and then attempt to create the new NoUI document based on this profile, then try to instantiate and expand the symbol to get the editable text and export output files.

Translate