Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Can anyone confirm that this happens and I am not doing it wrong?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hello Mr. Patterson!
I was hoping this question would catch your eye and you would reply!!
I had done the above mentioned to check if I was doing it right... The name of the action recorded is indeed the same I used for the PlayActionEvent method in my code.
Here is the event recorded in the action file,
{
/useRulersIn1stQuadrant 0
/internalName (adobe_hideSelection)
/localizedName [ 14
486964652053656c656374696f6e
]
/isOpen 0
/isOn 1
/hasDialog 0
/parameterCount 0
}
I don't understand why its happening like that.