Skip to main content
CarlosCanto
Community Expert
Community Expert
October 22, 2017
Question

What's New in Illustrator Scripting CC2018

  • October 22, 2017
  • 9 replies
  • 10087 views
Please download the attached file to view this post
This topic has been closed for replies.

9 replies

CarlosCanto
Community Expert
Community Expert
January 31, 2020

data comes from the Object Model Viewer, you can open it from the ESTK's help menu. There's is an xml document the actual data gets pulled.

schroef
Inspiring
January 31, 2020

Sorry for asking, what is the "Object Model Viewer" and ESTK?

Do you have any idea why Adobe did not update their documentation?

 

EDIT

Ahh you mean ExtendedScript ToolKit... duhhh 😉

schroef
Inspiring
January 31, 2020

Bizar they drop Flash, yet these tools are still flash builds.... hahaha rediculous!!

schroef
Inspiring
January 29, 2020

Call me crazy but why doesnt have antiAliasing any effect? i changed it to ARTOPTIMZED or NONE, makes no difference. Also checked SCALEBYRESOLUTION. its still looking jagged?

schroef
Inspiring
January 29, 2020

setting it to Type does work, but when we use the export screen function Art simple works and is smooth. But it is now when using it with scripting

 

 

 

jpegParam.antiAliasing = AntiAliasingMethod.TYPEOPTIMIZED;

 

 
See below the 3 versions both None and ArtOptimized look exactly same
CarlosCanto
Community Expert
Community Expert
January 30, 2020

it's a bug, fortunately TYPEOPTIMIZED works.

schroef
Inspiring
January 29, 2020

Really great, how did you found this data?

 

its 2020 and they still have their official docs at 2017?!?!?

scottr12917177
Inspiring
October 26, 2017

Thanks for posting this Carlos!!

Looks like they changed the interface for "TextFrame.textRange.justification.CENTER" enumeration? My scripts are throwing an error when trying to " myDoc.textFrames.textRange.justification = Justification.CENTER;"?

Cheers,

Scott

CarlosCanto
Community Expert
Community Expert
October 27, 2017

Hi Scott, it works fine here with Win10, CC2018.

change this

myDoc.textFrames.textRange.justification = Justification.CENTER

you're missing the index, perhaps that's the problem?

myDoc.textFrames[0].textRange.justification = Justification.CENTER

scottr12917177
Inspiring
October 27, 2017

*** Sharing the solution in case anyone sees this problem. ***

Hey Carlos, thanks for the reply and I found the issue!

So, you were able to create a textFrame object, and set the parameters WITHOUT assigning any content:

    // create number textFrame

    var artBoardNum = myDoc.textFrames.add();

    // sets style on number textFrame

    artBoardNum.textRange.characterAttributes.fillColor = fontColor;

    artBoardNum.textRange.characterAttributes.size = fontSize;

    artBoardNum.textRange.characterAttributes.strokeWeight = 0;

    artBoardNum.textRange.characterAttributes.textFont = fontStyle;

   

    // BELOW LINE WILL NOT WORK!!!

    artBoardNum.textRange.justification = Justification.LEFT;

   

    // assign number to textFrame object

    artBoardNum.contents = artboardNum.toString();

   

Solution: You have to assign content to the textFrame BEFORE changing the justification property!?!?

    // create number textFrame

    var artBoardNum = myDoc.textFrames.add();

    // sets style on number textFrame

    artBoardNum.textRange.characterAttributes.fillColor = fontColor;  

    artBoardNum.textRange.characterAttributes.size = fontSize;

    artBoardNum.textRange.characterAttributes.strokeWeight = 0;

    artBoardNum.textRange.characterAttributes.textFont = fontStyle;

   

    // assign number to textFrame object

    artBoardNum.contents = artboardNum.toString();

  

    // MOVE AFTER CONTENT HAS BEEN ADDED?

    artBoardNum.textRange.justification = Justification.LEFT;

daneJ
Inspiring
October 26, 2017

CarlosCanto

Do you know if the asset class and collection at the top for manipulating cloud libraries?

Thanks.

daneJ
Inspiring
October 24, 2017

Hey CarlosCanto,

Thanks alot for posting this.

Is the asset class and collection at the top for cloud libraries?

Thanks,

Dane

CarlosCanto
Community Expert
Community Expert
October 27, 2017

Hi daneJ, no, the new Assets collection refers to the assets in the Asset Export Panel.

daneJ
Inspiring
October 27, 2017

Too bad. I'd sure like some methods to work with and modify the cloud libraries. When you have thousands of Library elements and much of your work involves these libraries, some scripting could really make a difference. Maybe CC 2019.

Known Participant
October 23, 2017

Thank you CarlosCanto.

MichaelK ¯\_(ツ)_/¯
Ten A
Community Expert
Community Expert
October 22, 2017

Thanks, Its very helpful. (^-^)/

Silly-V
Legend
October 22, 2017

Thank you for posting this, Carlos.

Silly-V
Legend
October 24, 2017

I wonder what possibilites and uses are for this:

JavaScriptExecutionMode

When should a JavaScript debugger be shown.

JavaScriptExecutionMode.BeforeRunning  (Read Only)

Data Type: int, Value: 3

Show the JavaScript debugger at the first line of the JavaScript.

JavaScriptExecutionMode.OnRuntimeError  (Read Only)

Data Type: int, Value: 2

Show the JavaScript debugger is a runtime error occurs.

JavaScriptExecutionMode.never  (Read Only)

Data Type: int, Value: 1

Never show the JavaScript debugger. Treat runtime errors by throwing a JavaScript exceptions.

CarlosCanto
Community Expert
Community Expert
October 27, 2017

Hi Silly-V,

JavaScriptExecutionMode has been around since at least CS4, it seems to be used for testing purposes, their testing purposes.