Retrieve menu entries [SOLVED]

I always struggle a lot to find this kind of information in the wiki.
How can I retrieve the number of menu entries and where is that described in the wiki?

Thanks a lot!

Do you mean menu-entries on parameters?
If so, check out the parameter python class on the wiki. You can acces the names or labels as an attribute of the parameter.
op(‘my_op’).par.my_menu.menuNames or menuLabels

Thanks, I’m right there now but I can’t find what I’m looking for.
I need to know how many entries the menu has. Let’s say I have 4 labels in my dropdown menu I would get an integer equal to 3.

Just to clarify, I’m talking about these entries.

the attributes return a list of all the items. Then its as simple as 5 Examples of How to Get Python list length (array, tuple, dictionary also)

1 Like

Of course! Thanks a lot :slight_smile: