DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Palettes in DIAdem

Hi Guys,

By "hijack" I meant that you can change the functionality of a standard icon along the top icon bar of each Panel in DIAdem.  You can not change the number of icons along that top icon bar, but you can change the tip strip and functionality associated with each one.  The only MenuItem..() functions which I can get to work with the icons are the MenuItemDel() and MenuItemChange() commands.  The MenuItemChange() command associates a new tip strip and a new action with an existing icon.  The MenuItemDel() command deletes any customization of that icon and retuns it to its normal ("unhijacked") behavior.  The MenuItemDel() command does NOT remove an icon the way that it removes a menu.

While it's inconvenient that the MenuItemCount() function does not work on the icon bar, at least for a given version of DIAdem you are guaranteed that the number of icons is constant, since there is no programmatic way to remove them.

Note that in some cases there are invisible icons in the icon bar.  For instance "I.4" in SCRIPT is invisible.

Icon = "I.6"
Call MenuItemDel("SCRIPT", Icon)
Call MenuItemChange("SCRIPT", Icon, "deactivated","msgbox ""deactivated""")

Hope that clears things up,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
Message 11 of 18
(2,920 Views)

Hi Marc,

The MenuItemCountGet function specifices the number of items in a menu or submenu with the syntax of ReturnValue = MenuItemCountGet(WndName, MenuItemPos)

 

WndName specifies the name of the DIAdem panel.

MenuItemPos specifies the menu

 

There are several options for the MenuItemPos variable which are:

 

M – Specifies the position of a menu or of a menu item in the menu bar

C – Specifies the position of a menu item in a shortcut menu

I – Specifies the position of a button in the toolbar

 

The following example displays the number of menu items in the first submenu of the fifth menu in the DIAdem REPORT menu bar (5th menu = Settings   1st submenu = Layout Settings

 

Call MsgBoxDisp(“Number of menus: “  & MenuItemCountGet(“REPORT”, “M.5.1”))

 

For some more helpful information see the tutorial How to easily customize DIAdem with custom menus

Hope this helps!

 

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 12 of 18
(2,908 Views)

Hi,

 

Knowing that the Icons customisation is limited as Brad explained, now everything is clear. Thanks Brad.

 

Jonathan,

Thanks for your interest but I read some days ago the tutorial that you recommended and it’s very useful to work with the Menus but didn’t help at all with the Icons.

 

Thanks to all of you.

 

Best Regards,

Marc.

0 Kudos
Message 13 of 18
(2,899 Views)

Hi Guys,

 

As Brad mentioned before its possible to change the appearance of those icons you can do it as follows:

 

In the DIAdem main folder you will see a folder call Symbols, normally corresponds to the following path: C:\Archivos de programa\National Instruments\DIAdem 9.1\Symbols

Inside this folder are all the icons used by DIAdem. Now if you want to change the appearance of a certain icon all that you have to do is to locate the “BMP” file that contains the image of the corresponding icon and to modify the corresponding area as you wish. Of course I recommend you to keep a copy of the original file.

 

You can change that file while DIAdem is running, so that allows you to do it with a certain VBS at any time. You can assign to it any function, as explained before… all that you have to do is to keep the original file name and to place it in the original path.

 

For example I did it with the Icon number 32 of the DIAdem Report… The file that contains that icon is “Report_00.bmp” if you want to tray I attached the modified file to this message…

 

Best Regards,

Marc.

0 Kudos
Message 14 of 18
(2,884 Views)
Hi everyone,


I'd like to deactivate ALL Icons / functions while doing an operation in VIEW with InteractionOn() - just like in KeyWait(). Isn't there any easier way but taking care of each icon? Also the window icons (as NAVIGATOR, REPORT etc.) are still available.


Cheers,
Yeti

I'm running DIAdem 10.2, btw.
0 Kudos
Message 15 of 18
(2,330 Views)
Hi Yeti,

Unfortunately, the methods discussed previously are the only way to manipulate the menu and icons.  We are working our best to incorporate more functionality in future releases of DIAdem, and appreciate your feedback.  Thanks!
Matt S
National Instruments
Applications Engineer
0 Kudos
Message 16 of 18
(2,288 Views)
What a shame... But thanks a lot for your answer, Matt!!


I was hoping/wondering if it was possible to enter something into the brackets of InteractionOn().


The problem with my colleagues is that everyone is into his habits in doing an analysis, close the information window and think they ended the script. That screws my script by not ending the interaction. Why reading that information window(s) I did put in there.... And then wondering why nothing turns out as it should. That's why I want to take them permission in doing anything while running an interaction...
0 Kudos
Message 17 of 18
(2,276 Views)

Hi Yeti,

maybe I have a work around for You. You can switch the DIAdem window in a fullsize mode in which the panel bar as well as the menus and the icon bars disappear.

Try the following commands:

Call WndShow("VIEW","FullSize") 'Switch DIAdem to fullsize display

Call InteractionOn

Call WndShow("VIEW","Maximize") ''Switch DIAdem back to maximized window size

After that call Your dialog.

Unfortunately with this solution Your users have to switch off the Interaction Mode via the context menu (right hand mouse click).

Hope that helps.

ThomAC


 

0 Kudos
Message 18 of 18
(2,184 Views)