DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Menu Item using Python

In the VBS world of scripting it was possible to add a menu item via (https://forums.ni.com/t5/Example-Code/How-to-Add-a-New-Menu-Item-to-DIAdem/ta-p/3506442)

MenuItemInsert("VIEW", "7","PopUp","My Custom Functions")

Is there an equivalent method using the python interface? I'd like to avoid mixing VBS and python if at all possible.

 

0 Kudos
Message 1 of 2
(226 Views)

Hello pcristini_hitachienergy,

 

Python was introduced in DIAdem 2020 as an alternative programming language, and it is now possible to use a Python interface to add a menu item.

 

In your case, I suggest selecting Python as the preferred scripting language. You can always modify your preferred scripting language in DIAdem at Settings » DIAdem Settings » SCRIPT.

You should just check that you have installed the Python module pywin32 and a version of Python that is supported by DIAdem. You will find more information about the integration of Python in DIAdem here.

 

Do not hesitate to ask further questions.

0 Kudos
Message 2 of 2
(99 Views)