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

How to get the Bounds of Art and get the current active document in illustrator 2019 cc SDK.

New Here ,
May 16, 2025 May 16, 2025

I am new to plugin development for illustrator 2019 CC SDK. I got matching through

sAIMatchingArt->GetMatchingArt(&pathSpec, 1, &matching, &artCount); and traversed it to get Art.

I made a type check on the Art: sAIArt->GetArtType(art, type) != kNoErr, indicating that this is an invalid Art. So I cannot get the Bounds of this Art.

 

At the same time, when I want to get the current active document, the returned result is "doc" error. AIDocumentHandle activeDoc = nullptr;
ASErr err = sAIDocument->GetDocument(&activeDoc);
The result of err is "doc", which means I cannot get the current active document.

136
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 ,
May 16, 2025 May 16, 2025

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">
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 ,
May 17, 2025 May 17, 2025

thank

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 ,
May 17, 2025 May 17, 2025

(you're welcome)

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 ,
May 19, 2025 May 19, 2025
LATEST

In fact, I am missing AppContext to call the context of objects in the selected area.
For example, the following code:

AppContext appContext(fPluginRef);
std::vector<AIRealRect> boundsList = GetSelectedArtBounds();

 

The result of basicArtList is the bounds of the art object I need.

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