Skip to main content
Toto RoToTO
Inspiring
April 20, 2009
Answered

layer selected

  • April 20, 2009
  • 1 reply
  • 920 views

Jsut to know if there is a known bug on GetLayerSelected method, or do i it wrong?

I would like to know if a given layer  is selected, but whatever its selection state, this method always send me back false!

here it is the code:

AIBoolean isSelected = false;
result = sAILayer->GetLayerSelected(layerHandle, &isSelected);

aisdk::check_ai_error(result);

thx, thomas.

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

AILayerSuite::GetLayerSelected() is only there for AI6.0 -- there is no concept of a 'selected layer' anymore. I assume you're trying to figure out what layers are hilited in the Layers panel? If so, there is no way to get that unfortunately. If you want to know if any art on a layer is selected, use LayerHasSelectedArt() instead.

1 reply

A. Patterson
A. PattersonCorrect answer
Inspiring
April 22, 2009

AILayerSuite::GetLayerSelected() is only there for AI6.0 -- there is no concept of a 'selected layer' anymore. I assume you're trying to figure out what layers are hilited in the Layers panel? If so, there is no way to get that unfortunately. If you want to know if any art on a layer is selected, use LayerHasSelectedArt() instead.

Toto RoToTO
Inspiring
April 22, 2009

This was not explicitly written in the documentation that this method was obsolete.

But you were totaly right when you assumed what i wanted to do.

Now, i know which method to use, it will be ok.

thx,

Thomas.