Skip to main content
Participating Frequently
July 31, 2015
Question

Is it possible to "simply" write a javascript Object>Blend Options>Spacing>Specified Steps?

  • July 31, 2015
  • 3 replies
  • 867 views

I am trying to write a script that will iterate through some guilloche patterns and need to do it in an automated fashion, not with a plugin or manually.

I cannot figure out how to have 2 paths selected and create n Specified Steps.

Thank you

This topic has been closed for replies.

3 replies

pharmon_Author
Participating Frequently
August 3, 2015

Thank you all for insight into how to delve deeper into this.

http://www.mrgan.com/pub/test/Preferences/Adobe%20Illustrator%20CS4%20Settings/en_US/Neven.kys

I think the next steps is to figure out how this:

     app.executeMenuCommand('Path Blend Options');

equates to this:

       /Path\ Blend\ Options {

       /Context 0

       /Modifiers 0

       /Represent 0

       /Key 0

       }

So I can change this into something useful:

       /spacing {

       /Context 0

       /Modifiers 224

       /Represent 79

       /Key 79

       }

Qwertyfly___
Legend
August 4, 2015

Actions can be recorded for Blend Make and Blend options.

once you have the options set you can turn off the dialog.

(click the box I have circled)

the action can be run with: (in this case)

app.doScript("275 steps", "Blend", false);

if you dont want to have to create an action on the machine you need to run this on then you can create actions with javascript.

see here for an Idea on how this can be done:

Re: "Isolation Mode" and Javascript.

and if you dont want to leave the action sitting on the action panel you can remove it with:

app.unloadAction("Blend","");

hope this helps...

Inspiring
August 1, 2015

@CarlosCanto are there executeMenuCommand(s) for blends, it looks like there are, but seems if so then they would need interaction with the dialogs?

@pharmon_ what are you hoping to accomplish? Can you post a picture of an example of a starting point and the finished result you envision? You can maybe use duplicate() but depending on the desired outcome the math(s) required could get quite involved. An example picture as stated could clarify if something like that could be possible.

pixxxelschubser
Community Expert
Community Expert
August 1, 2015

Please try (if CS6+):

app.executeMenuCommand('Path Blend Make');

app.executeMenuCommand('Path Blend Options');

You need two selected paths as minimum.

Have fun

Inspiring
August 1, 2015

Hi pixxxel schubser,

Thanks. Yeah I had seen there are some, but I am exuberantly using CS5, so I miss out on a few things, both in usage and testing. ;-)

Do those work without dialogs and user interaction ?

CarlosCanto
Community Expert
Community Expert
August 1, 2015

unfortunately no, there's no Scripting access to Blends...

...if you're adventurous you can use Sendkeys to simulate user input.