Can I add a button to show another uxp-panel

Hi,
I created a plugin with several panels and some panels can use features from others.
E.g. I have a dedicated panel for adding a Logo and a panel for exporting images.
I want to add a button to the exporting image panel so that when a user presses this button, it will open the Logo panel.
Can this be done?

Thanks

Can the logo panel be used as a standalone panel? I mean, can it be useful without the export panel? If not, I’d refactor it to be as a dialog. If yes, then you’d need to use panel state info from menuBarInfo (IIRC) and use command ID to show or hide it. Unless there’s already a better way to handle this, which I don’t know of :slight_smile:

The logo is a dedicated panel, it cannot be a dialog.
how can i get this “menuBarInfo” - do i use Alchemist listener for that and then run it in batchplay as i would any other menu item?

for now what you are looking for cannot be done, maybe in the future.

@Maher’s post in the search results has a pretty much full solution I think

It appears that as @haller replied, this cannot be done in y case.
Or can it?
I managed to run it once after getting the ID using batch play, however the ID is a negative number and from what I read those are not reliable and they do change after I restart PS.

I tried one of the suggestion which is to create an action and load into Occultist, however nothing is recorder when I select:
Plugins>Name>SubName

Did you check what you get from menuBarInfo? IIRC it has command ID

I got a negative ID “-21074” and after restarting SP this ID changed.

Yes, but every time you can get that ID from menuBarInfo :man_shrugging:

1 Like

Yes I can. this would solve it but I can’t get it to work for some reason.
I tried:

async function getAppProperty(prop) {
   return require("photoshop").action.batchPlay([
     {
       _obj: 'get', 
       _target: [
         { _property: prop },
         { 
            _ref: 'application',
            _enum: 'ordinal',
            _value: 'targetEnum'
         }],
     },
   ], { synchronousExecution: true })[0][prop]
 }

async function showDnDLogoPanel(){
    check = await getAppProperty("menuBarInfo");

I get this error:
cannot red property of undefined…reading menuBarInfo…

Did you debug? What do you get if you remove [0][prop]? I don’t see anything wrong in your sample, but it’s always good to start debugging if something works not as expected