Skip to main content
Participant
December 1, 2020
Answered

offset path

  • December 1, 2020
  • 2 replies
  • 1377 views

how to implement offset path function in C++ using adobe illustrator SDK? I want to write an offset path function using the illustrator SDK, the working of the function is the same as being used in adobe illustrator itself. click the path, offset path, get the dialog box, enter offset limit, and click ok. can anybody help me in this regard?  

This topic has been closed for replies.
Correct answer Rick E Johnson

Good news: your question has been answered here on this forum a few years ago! Since Adobe changed the forum format, though, it's nearly impossible to find things anymore, so you'll need a bit of luck and patience to find it.

 

I wrote a plugin that incorporated that info, but I develop using Hot Door's CORE so including my code here probably won't be very helpful.

 

Essentially, you create an Action message in your code and send that to Illustrator. I hope that helps -- Rick

2 replies

Participant
November 19, 2022

can some explain what is going on here? offset path is not avaible for me why is that?

femkeblanco
Legend
November 19, 2022

Because that is an image (composed of pixels), not vectors (paths and whatnot). 

Rick E Johnson
Rick E JohnsonCorrect answer
Inspiring
December 2, 2020

Good news: your question has been answered here on this forum a few years ago! Since Adobe changed the forum format, though, it's nearly impossible to find things anymore, so you'll need a bit of luck and patience to find it.

 

I wrote a plugin that incorporated that info, but I develop using Hot Door's CORE so including my code here probably won't be very helpful.

 

Essentially, you create an Action message in your code and send that to Illustrator. I hope that helps -- Rick

ss92139721
Participating Frequently
December 2, 2020

select path try to use this code:

AIActionParamValueRef vref;
sAIActionManager->AINewActionParamValue(&vref);
AIReal offset_l = 5;
AIReal limit = 4;
const char* type = "Round"; //Round Miter Bevel
sAIActionManager->AIActionSetUnitReal(vref, 1868985204, 592476268, offset_l);
sAIActionManager->AIActionSetReal(vref, 1835627634, limit);
sAIActionManager->AIActionSetEnumerated(vref, 1785623664, type, 0);
sAIActionManager->PlayActionEvent("ai_plugin_offset", dialogStatus, vref);
sAIActionManager->AIDeleteActionParamValue(vref);

 

you can try to record Action and save aia  open and Read to understand   ><

nasmehAuthor
Participant
December 3, 2020

Hi Rick,

             Thanks a lot for your reply, I am new to AI SDK but I am trying hard to learn it. up until now, I was trying to build this offset path function using arthandle and aipath suites, but no luck. your code seems reasonable but still hard for me to build the complete function, I would like to make a request to you that if you can elaborate on this function, I shall be very thankful to you