Skip to main content
Participant
July 25, 2017
Answered

How can I get the handle of the first art I have selected?

  • July 25, 2017
  • 1 reply
  • 568 views

Hi all,

I wish to resize (make same size actually) programmaticaly a selection of some arts that I have got with AIMatchingArt->GetMatchingArt(...). Actually my Plugin derives from Transform Objects tutorial.

I would like the first art selected to enforce its size to the other arts (could be the last art as well, but anyway I need a key art as a reference, a model for the others).

But the first art handle in the artlist is not the one I have first selected. The first art in the artlist is apparently the first in the hierarchy (tree) of layers and sub-layers.

How can I get the handle of the first art I have selected?

Pierre

This topic has been closed for replies.
Correct answer A. Patterson

Illustrator already has this concept, and you can get it using AIArtSuite::GetKeyArt(). They use this for their own alignment & sizing functionality.

1 reply

A. Patterson
A. PattersonCorrect answer
Inspiring
July 25, 2017

Illustrator already has this concept, and you can get it using AIArtSuite::GetKeyArt(). They use this for their own alignment & sizing functionality.

Participant
July 26, 2017

Ok, it works.

May I have another question?

How can I know that an art is aspect ratio-constrained or not through the API?

I cannot find this specific object property.

Thanks

Pierre

A. Patterson
Inspiring
July 26, 2017

I don't know that art has an such property. The only time they do that (as far as I know) is when you hold shift down while resizing something (e.g. art or using a tool like the rectangle or ellipse tool).