Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
So here what you would like to read: Yes you can! Pretty straightforward!
Copy link to clipboard
Copied
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);
Copy link to clipboard
Copied
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!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now