Highlighted

trying to create an illustrator script to create new document, but can't set the doc profile

New Here ,
Apr 30, 2020

Copy link to clipboard

Copied

hi,

I am trying to create an illustrator script to create a new document, but I want it to use one of my new document profiles, ie. Print, Web, etc.

I found this (below), but cannot seem to set it in the document, any ideas?

 

Parameter Type Description

presetType       

DocumentPresetType:
DocumentPresetType.Print
DocumentPresetType.Web
DocumentPresetType.Mobile
DocumentPresetType.Video
DocumentPresetType.BasicCMYK
DocumentPresetType.BasicRGB

  

Topics

How to, Scripting

Views

327

Likes

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

trying to create an illustrator script to create new document, but can't set the doc profile

New Here ,
Apr 30, 2020

Copy link to clipboard

Copied

hi,

I am trying to create an illustrator script to create a new document, but I want it to use one of my new document profiles, ie. Print, Web, etc.

I found this (below), but cannot seem to set it in the document, any ideas?

 

Parameter Type Description

presetType       

DocumentPresetType:
DocumentPresetType.Print
DocumentPresetType.Web
DocumentPresetType.Mobile
DocumentPresetType.Video
DocumentPresetType.BasicCMYK
DocumentPresetType.BasicRGB

  

Topics

How to, Scripting

Views

328

Likes

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
Adobe Community Professional ,
May 01, 2020

Copy link to clipboard

Copied

use the below command

app.documents.addDocument('Web');

Likes

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
Reply
Loading...
Adobe Community Professional ,
May 01, 2020

Copy link to clipboard

Copied

The description of addDocument method is as follows

app.documents.addDocument(startupPreset [, presetSettings] [, showOptionsDialog])

Parameter Type Description
startupPreset String Startup preset to use
presetSettings DocumentPreset, optional Preset document template
showOptionsDialog Boolean, optional Whether to show options dialog

 

-Manan

 

Likes

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
Reply
Loading...
Enthusiast ,
May 01, 2020

Copy link to clipboard

Copied

Salut!

Moi j'utilise:

var doc = documents.addDocument("Vidéo et Film",app.getPresetSettings("Vidéo et Film"));

ou
var index = 11;
var doc = documents.addDocument(startupPresetsList[index],app.getPresetSettings(startupPresetsList[index]))

 

var presetsList = [];
  for (i = 0; i < startupPresetsList.length; i++) {
    presetsList[i] = [i,startupPresetsList[i]];
  }
  alert("Repèrez bien l'index !!\r\r"+presetsList.join('\r'));
var index = prompt("Index presetlist",0);
  alert("Votre choix: "+presetsList[index][1]);

var doc = documents.addDocument(presetsList[index][1],app.getPresetSettings(presetsList[index][1]));

 

 

 

Likes

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
Reply
Loading...