Skip to main content
CarlosCanto
Community Expert
Community Expert
Oct 22, 2017 5:25 AM UTC
Question

What's New in Illustrator Scripting CC2018

Please download the attached file to view this post
This topic is closed to new replies. Start a new post to keep the conversation going.

28 replies

CarlosCanto
Community Expert
Community Expert
Jan 31, 2020 3:54 PM UTC

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.

Translate
schroef
Inspiring
Jan 31, 2020 4:39 PM UTC

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 😉

Translate
schroef
Inspiring
Jan 31, 2020 5:03 PM UTC

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

Translate
schroef
Inspiring
Jan 29, 2020 10:36 PM UTC

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?

Translate
schroef
Inspiring
Jan 29, 2020 10:45 PM UTC

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
Translate
CarlosCanto
Community Expert
Community Expert
Jan 30, 2020 3:12 PM UTC

it's a bug, fortunately TYPEOPTIMIZED works.

Translate
schroef
Inspiring
Jan 29, 2020 9:51 PM UTC

Really great, how did you found this data?

 

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

Translate
scottr12917177
Inspiring
Oct 26, 2017 2:43 PM UTC

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

Translate
CarlosCanto
Community Expert
Community Expert
Oct 27, 2017 7:49 AM UTC

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

Translate
scottr12917177
Inspiring
Oct 27, 2017 4:10 PM UTC

*** 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;

Translate
daneJ
Inspiring
Oct 26, 2017 1:56 PM UTC

CarlosCanto​

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

Thanks.

Translate
daneJ
Inspiring
Oct 24, 2017 11:57 AM UTC

Hey CarlosCanto,

Thanks alot for posting this.

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

Thanks,

Dane

Translate
CarlosCanto
Community Expert
Community Expert
Oct 27, 2017 7:28 AM UTC

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

Translate
daneJ
Inspiring
Oct 27, 2017 7:50 AM UTC

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.

Translate
Known Participant
Oct 23, 2017 6:47 PM UTC

Thank you CarlosCanto.

Translate
MichaelK ¯\_(ツ)_/¯
Ten A
Community Expert
Community Expert
Oct 22, 2017 11:02 PM UTC

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

Translate
Silly-V
Legend
Oct 22, 2017 3:18 PM UTC

Thank you for posting this, Carlos.

Translate
Silly-V
Legend
Oct 24, 2017 2:04 PM UTC

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.

Translate
CarlosCanto
Community Expert
Community Expert
Oct 27, 2017 8:28 AM UTC

Hi Silly-V,

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

Translate