Skip to main content
Inspiring
November 25, 2016
Question

The hide selection API hides everything on the document

  • November 25, 2016
  • 1 reply
  • 1061 views

Hi All,

Why doesn't this work?

I have a selection on the document.

result = sAIActionManager->PlayActionEvent("adobe_hideSelection", kDialogOff, NULL);

It hides every item on the document, instead of the current selection.

I have tried this as well,

AICommandID toggleVisiblity;

error = sAICommandManager->GetCommandIDFromName(kHideCommandStr, &toggleVisiblity);

error = sAIMenu->InvokeMenuAction(toggleVisiblity);

Same result.

Is this API broken, or am I missing something?

I am using AI CC 2015.3

This topic has been closed for replies.

1 reply

poortip87Author
Inspiring
November 28, 2016

Can anyone confirm that this happens and I am not doing it wrong?

A. Patterson
Inspiring
November 28, 2016

When in doubt, record it and decipher the action to make sure it's the same as what you're doing. It's annoying, but it's the only way to be sure.

A. Patterson
Inspiring
November 28, 2016

Details:

1. Open Actions panel.

2. Create new Action set, named whatever you want

3. Hit Record.

4. Using menu, do hide selection.

5. Stop recording.

6. Save action set to desktop.

7. Open .aia file in a text editor and start reverse engineering the parameters. For something like this, it should be pretty quick.

If you need help deciphering the .aia, let me know.