Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Jul 31, 2015 Jul 31, 2015

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

TOPICS
Scripting
892
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 31, 2015 Jul 31, 2015

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

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 01, 2015 Aug 01, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 01, 2015 Aug 01, 2015

Please try (if CS6+):

app.executeMenuCommand('Path Blend Make');

app.executeMenuCommand('Path Blend Options');

You need two selected paths as minimum.

Have fun

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Aug 01, 2015 Aug 01, 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. 😉

Blend - executeMenuCommand.png

Do those work without dialogs and user interaction ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2015 Aug 02, 2015

W_J_T schrieb:

Hi pixxxel schubser,

… Do those work without dialogs and user interaction ?

Sorry. I haven't CS6+ here at home. Perhaps I can try this at work in the next days.

But IMHO:

app.executeMenuCommand('Path Blend Make');

should do without a dialog.

app.executeMenuCommand('Path Blend Options');

I think this command will show the blend options dialog (like in the UI)

Greetings

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 02, 2015 Aug 02, 2015

yeah, the Blend Commands work as if the user is clicking the menus, except we don't get a chance to change the dialog options.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 02, 2015 Aug 02, 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

       }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Aug 03, 2015 Aug 03, 2015
LATEST

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)

act.JPG

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines