Skip to main content
Known Participant
April 1, 2023
Question

How to trigger “Select All Unused” flyoutmenu of “Swatches Panel” in illustrator sdk using c++

  • April 1, 2023
  • 2 replies
  • 1356 views

Hi all,

AIAPI AIErr(* GetFlyoutMenu )(AIPanelRef inPanel, AIPanelFlyoutMenuRef &outFlyoutMenu)

For the above code, what is the first parameter need to be passed for swatch panel.

This topic has been closed for replies.

2 replies

Rick E Johnson
Inspiring
April 1, 2023

It's possible to record an action for that, so it's probably also possible to create and run that action on the fly. If you search this forum, I'm sure you'll find it.

A. Patterson
Inspiring
April 1, 2023

That's a fair answer. Playing an action is often a workaround to a missing C++ API, though it can come with constraints. For something like this though, it probably does the job. @Rick E Johnson is right as well about examples on the forum: I know I've read & answered many questions on PlayAction, just do a search for that.

Rick E Johnson
Inspiring
April 1, 2023

One issue when using actions this way is that you won't get back much meaningful information, just an error code. If the action creates or changes art, it will be selected -- the same is true for the swatches in your case. You will have to figure out for yourself if the action did anything useful.

A. Patterson
Inspiring
April 1, 2023

You can't do what you're trying to do. That API is purely so you can create & manage your own panels, not manipulate other plugin's panels.

 

There is no C++ API for interacting with the UI of any shipped pluign directly.