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

How to get all placed items on illustrator sdk ( sAIPlaced )

Explorer ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

Iam new in illustrator plugin development. 

 

I am trying to get all places image via illustrator sdk.

 

I trying with "sAIPlaced" suite. But I didn't get any result.
Is there any possible .

Murali.M
TOPICS
SDK

Views

265

Translate

Translate

Report

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

correct answers 1 Correct answer

Engaged , Apr 17, 2021 Apr 17, 2021

Hi, welcome to the forum! Since you say you're new to this, you may be looking for a method to find all placed art. This is a snipped from how I do it:

 

AIMatchingArtSpec spec[1];
AIErr error;
*matches = nil;
spec[0].type = kPlacedArt;
spec[0].whichAttr = 0;
spec[0].attr = 0;
error = sAIMatch->GetMatchingArt( spec, 1, matches, numMatches );

 

Once selected, you may want to iterate through the list to check if they're locked, visible, etc.

If you've already done that, then maybe you're planning to ac

...

Votes

Translate

Translate
Adobe
Explorer ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

Hi Murali.M!

 

I think you need to be a bit more specific about what you want to do.

 

What do you mean with "get all places image"? Do you want a list of handles to all the placed art in a document OR perhaps the coordinates of a selected image? And what do you mean with "image", paths or placed artwok?

 

If you want to find all placed art within a document I would try using MatchingArtSet from AIArtSetSuite, and check for kPlacedArt.

Votes

Translate

Translate

Report

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
Engaged ,
Apr 17, 2021 Apr 17, 2021

Copy link to clipboard

Copied

Hi, welcome to the forum! Since you say you're new to this, you may be looking for a method to find all placed art. This is a snipped from how I do it:

 

AIMatchingArtSpec spec[1];
AIErr error;
*matches = nil;
spec[0].type = kPlacedArt;
spec[0].whichAttr = 0;
spec[0].attr = 0;
error = sAIMatch->GetMatchingArt( spec, 1, matches, numMatches );

 

Once selected, you may want to iterate through the list to check if they're locked, visible, etc.

If you've already done that, then maybe you're planning to access the actual item that was placed. I've done this with scripts, but not in the SDK -- sorry I don't have C++ code to offer for that. With AppleScript it's easy to get the file path, then find the item via the OS file system, and even hand it off to another app to edit.

 

Best of luck with your project!

Votes

Translate

Translate

Report

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
Explorer ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

LATEST

First of all thank you both of you.

Eespecially @Rick E Johnson  Great, It's working fine. 

I success fully geting the placed images with below code.

sAIPlaced->GetPlacedFilePathFromArt(art,filePath);


I need one more help. How to I get the status of Transparent. Refer below snap.

Screenshot 2021-04-18 at 9.27.22 PM.png

Murali.M

Votes

Translate

Translate

Report

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