# Inquiry About Consistency of Command IDs in Photoshop API

**URL:** <https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743>\
**Category:** UXP Plugin API\
**Tags:** uxp, javascript, api-feedback\
**Created:** [April 25, 2025, 10:48am UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743 "2025-04-25T10:48:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![glass](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@glass](https://forums.creativeclouddeveloper.com/u/glass)\
**Post date:** [April 25, 2025, 10:48am UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/1 "2025-04-25T10:48:25Z")

</div>

Dear Photoshop Development Team,

I hope this message finds you well.

I’m exploring the Photoshop API, specifically the `require('photoshop').performMenuCommand()` functionality. Through debugging, I’ve observed that menu actions trigger commands with numeric IDs (e.g., `101` for certain undo, `1170` for opening the Actions panel, etc.).

Could you kindly clarify whether these **Command IDs remain consistent** across:

1. Different devices (macOS/Windows), and
2. Different Photoshop versions?

This information would be invaluable for ensuring reliable integrations. Thank you for your time and support.

Best regards,

---

<div class="post-metadata">

**Author:** ![haller](https://avatars.discourse-cdn.com/v4/letter/h/53a042/32.png) [@haller](https://forums.creativeclouddeveloper.com/u/haller)\
**Post date:** [April 25, 2025, 11:06am UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/2 "2025-04-25T11:06:53Z")

</div>

From what I know the ids remain the same and unchanged in the versions of photoshop.  
The values ​​that change are those with a negative value such as:  
-20013.

---

<div class="post-metadata">

**Author:** ![glass](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@glass](https://forums.creativeclouddeveloper.com/u/glass)\
**Post date:** [April 25, 2025, 11:20am UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/4 "2025-04-25T11:20:36Z")

</div>

Your clarification aligns with my observations—that **plugin-related menu items (including built-in plugins like Blur filters) use negative Command IDs** , while native Photoshop functions use positive ones. This insight is greatly appreciated!!!

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [April 25, 2025, 3:03pm UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/5 "2025-04-25T15:03:49Z")

</div>

Even positive IDs may change  
Read [this post](https://forums.creativeclouddeveloper.com/t/how-reliable-are-filters-menu-commands/4169/4) how Adobe completely unnecessarily changed _Select \> Subject_ command ID without any warning:

> [@How reliable are Filters menu commands?](https://forums.creativeclouddeveloper.com/t/how-reliable-are-filters-menu-commands/4169/4):
>
> @kerrishotts, it seems even positive IDs can stop working without any warning… It used to be 1461 for Select \> Subject After update menu changed and it’s now split into two - on cloud and on device. Totally different IDs and old item now has enabled: false, visible: false. Because it’s not enabled, command ID 1461 just doesn’t work any more. How do we deal with such changes?

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [April 25, 2025, 6:55pm UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/6 "2025-04-25T18:55:17Z")

</div>

I prefer select menu item instead and with string id. It can be recorded as action.

---

<div class="post-metadata">

**Author:** ![Karmalakas](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/karmalakas/32/1048_2.png) [@Karmalakas](https://forums.creativeclouddeveloper.com/u/Karmalakas)\
**Post date:** [April 25, 2025, 10:11pm UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/7 "2025-04-25T22:11:54Z")

</div>

Could you elaborate? 🧐

---

<div class="post-metadata">

**Author:** ![Jarda](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/jarda/32/1909_2.png) [@Jarda](https://forums.creativeclouddeveloper.com/u/Jarda)\
**Post date:** [April 26, 2025, 6:35pm UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/8 "2025-04-26T18:35:21Z")

</div>

Not now. I am on holiday. Just try record menu item selection as action in action panel.

---

<div class="post-metadata">

**Author:** ![TeeJay](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@TeeJay](https://forums.creativeclouddeveloper.com/u/TeeJay)\
**Post date:** [April 29, 2025, 10:38pm UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/9 "2025-04-29T22:38:06Z")

</div>

I think this may be of interest but you still need to know the top-level ID number, if you wish to apply it for something other than plugins.

> [@Question about migrating CEP plugin to UXP](https://forums.creativeclouddeveloper.com/t/question-about-migrating-cep-plugin-to-uxp/3974/6):
>
> It’s possible, yet a little complicated: Navigate Photoshop’s menu to match the plugin by name, then the panel by name. Read out the apps property panelList to check if the panel is currently visible Programmatically open the panel by its menu command To save you some time: (remove types if you’re not using Typescript) export const showPluginPanel = (pluginName: string, panelName: string, closeIfOpen: boolean = false) =\> { const menuBar = getAppProperty('menuBarInfo') const plugins = me…

The top-level ID numbers are as follows.

Menu Item: &Help, ID: 1

Menu Item: &File, ID: 2

Menu Item: &Edit, ID: 3

Menu Item: &Layer, ID: 4

Menu Item: T&ype, ID: 23

Menu Item: &Select, ID: 7

Menu Item: Fil&ter, ID: 6

Menu Item: &View, ID: 9

Menu Item: Plugins, ID: 7200

Menu Item: &Window, ID: 8

This mostly works for me but I wish to be able, for example, to navigate to the Color Transfer option in the Neural Filters section but I cannot work out how to do that, let alone programmatically select options and run the filter.

---

<div class="post-metadata">

**Author:** ![TeeJay](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@TeeJay](https://forums.creativeclouddeveloper.com/u/TeeJay)\
**Post date:** [April 30, 2025, 1:40am UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/10 "2025-04-30T01:40:48Z")

</div>

The proceeding looks a bit daunting.

Just to pick out the relevant part.

Once I had I installed a plugin, then typically I would select the Plugins menu within the menu bar, I would then select from the dropdown list the item ‘MyPlugin Folder’ and within that I would find the item ‘MyPlugin’. If I click on ‘MyPlugin’ then the plugin will activate.

To do this programmatically, I would use the following lines of code in the context of the above referenced implementation.

const menuBar = getAppProperty(‘menuBarInfo’);  
const plugins = menuBar.submenu.find(item =\> item.menuID === 7200);  
const plugin = plugins.submenu.find(item =\> item.title === “MyPluginFolder”);  
const panel = plugin.submenu.find(item =\> item.title === “MyPlugin”);  
await core.performMenuCommand({commandId:panel.command});

The above can be adapted to programmatically click to other items on other menus.

The preceding post omitted the ID for ‘Image’. I believe this is as follows.

&Image, ID: 5

If this is correct, then the following should, for example, invoke ‘Invert’

const menuBar = getAppProperty(‘menuBarInfo’);  
const level0 = menuBar.submenu.find(item =\> item.menuID === 5);  
const level1 = level0.submenu.find(item =\> item.title === “Adjustments”);  
const level2 = level1.submenu.find(item =\> item.title === “Invert”);  
await core.performMenuCommand({commandId:level2.command});

---

<div class="post-metadata">

**Author:** ![TeeJay](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@TeeJay](https://forums.creativeclouddeveloper.com/u/TeeJay)\
**Post date:** [July 6, 2025, 12:15pm UTC](https://forums.creativeclouddeveloper.com/t/inquiry-about-consistency-of-command-ids-in-photoshop-api/10743/11 "2025-07-06T12:15:07Z")

</div>

> [@Jarda](#):
>
> Not now. I am on holiday. Just try record menu item selection as action in action panel.

I proposed something in your absence, was this what you were intending?
