09-22-2006 03:57 AM
09-22-2006 10:20 AM
Hi salte,
The first thing to check is if in the code you have behind the custom menu you are in fact passing the full path to the *.SUD file or if you are instead just passing the name of the *.SUD file. When you load a VBScript into the DIAdem-SCRIPT editor, DIAdem automatically sets the default directory for VBScripts to the directory that VBScript was loaded from. But if you restart DIAdem and try from the menu, the default VBScript directory will revert back to being under the DIAdem program directory.
The other thing worth trying is to replace the code you showed below with a single command:
Call SudDlgShow("dlgName", "full path to sud file")
I seem to remember that in DIAdem 10.0 there was some issue with using those 2 commands instead of the 1 command above (which I always use).
Finally, I always make use of the AutoActPath variable to point to a *.SUD file in the same directory as the calling *.VBS file. I find that makes the whole application wonderfully portable-- which would look like this:
Call SudDlgShow("dlgName", AutoActPath & "name of sud file")
Hope that helps,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
09-25-2006 05:05 AM
09-25-2006 09:33 AM
Hi salte,
I was checking with R&D to be sure of my answer. Unfortunately, there is no way to disable a custom menu item in DIAdem. You can only make it disappear and reappear, which is less clear to the user.
Brad Turpin
DIAdem Product Support Engineer
National Instruments