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

Is there a way to call native AI functions

New Here ,
Feb 20, 2016 Feb 20, 2016

Hi,

By native AI function, I mean everyting coming up as filters, tools, etc in AI.

For example, I would like to call the "offset path" function, but cannot find any clue in the documentation.

Also, in my plugin I would like to have a checkbox that wouldset the constrain angle and show/hide the grid, instead of going to the default menu item

Is there a way to do that ?

Thanks in advance.

TOPICS
SDK
794
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
Enthusiast ,
Feb 29, 2016 Feb 29, 2016

Hi,

You should take a look at this documentation:

http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2015/programmers-guide.pdf

this will help you to understand what could be achieved using SDK.

In the same time, you should read that too:

https://github.com/Adobe-CEP/CEP-Resources/wiki/CEP-6-HTML-Extension-Cookbook-for-CC-2015

you will have a better idea of what could be done (UI).

Best regards,

Thomas.

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 ,
Mar 05, 2016 Mar 05, 2016

The docs aren't saying much, and a simple "you can" or "you can't" would have helped.

Personnally, I can't find anything in the docs that would positively answer my question, so asked here to see if someone has gone through this.

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
Enthusiast ,
Mar 06, 2016 Mar 06, 2016

So here what you would like to read: Yes you can! Pretty straightforward!

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
Advocate ,
Mar 06, 2016 Mar 06, 2016

Yes, the docs are not very helpful. I normally use three ways to find if you can do something in the SDK and you have chosen an example from each way!

1. Do a search on the header files. A search for "Grid" turns up:

AIDocumentView::SetGridOptions where the second argument allows you to show and hide the grid.

2. See if anything gets recorded while you are recording an action. Doing offset path records information that can be reproduced using AIActionManagerSuite, see:

Re: Call a user action from a plugin

Artboard Range When Saving as PDF

You could probably also reproduce the same behaviour using the AIPathSuite.

3. For preference settings, look in the preferences file:

Where to find Illustrator preference files

(CC 2014 is in Adobe Illustrator 18, CC 2015 is in Adobe Illustrator 19)

Searching for constrain:

/constrain {

  /sin 0.6819983125

  /cos 0.7313537598

  /angle 90.0

}

So you can use AIPreferenceSuite::PutRealPreference(NULL,"constrain/angle",180);

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
Advocate ,
Mar 06, 2016 Mar 06, 2016
LATEST

3. For preference settings, look in the preferences file:

Where to find Illustrator preference files

(CC 2014 is in Adobe Illustrator 18, CC 2015 is in Adobe Illustrator 19)

Searching for constrain:

/constrain {

  /sin 0.6819983125

  /cos 0.7313537598

  /angle 90.0

}

So you can use AIPreferenceSuite::PutRealPreference(NULL,"constrain/angle",180);

If changing the constrain angle, you should also change the sin and cos values to match the angle, so you don't get a mismatch as shown above!

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