Validating ATF/XML Files from the Shortcut Menu in DIAdem NAVIGATOR
Primary Software: DIAdem
Primary Software Version: 10.0
Primary Software Fixed Version: N/A
Secondary Software: DIAdem
Problem: You want to validate ATF/XML files before you load the files in DIAdem.
Solution: Enclosed with this article you will find a script that adds an item to the shortcut menu in DIAdem NAVIGATOR. You can click the menu item to validate ATF/XML files before you load them in DIAdem.
To use the script, complete the following steps:
- Download the enclosed script, unpack the script, and save the VBS file in a folder.
- Register the VBS script as a user command in DIAdem. To do this, select Settings - Options - Extensions - User Commands. Click the Add button, select the VBS script, click the Open button, and close the User Commands dialog box.
- To save the new settings in the desktop file, select Settings - Options - Save As, select a DDD file, and click Save. You can now use the registered user command any time in DIAdem.
- If you open the shortcut menu of an ATFX file in the DIAdem NAVIGATOR file browser, you can now select the menu item Validate ATF/XML. If the validated file is in order, a message box appears. Otherwise, the script opens an error protocol in DIAdem SCRIPT.
Notes on the VBS script:
The script is divided into the following subroutines:
- MyOnShowingContextMenu: In this subroutine, the command MenuPoints.Add("Validate ATF/XML", 1) creates the new menu item in the shortcut menu of an ATFX file. The first parameter is the name of the menu item. The second parameter specifies the ID that is the DIAdem reference.
- MyOnContextMenuPointSelected: This subroutine contains the actions that DIAdem executes when you click a specific menu item. DIAdem uses the ID to distinguish between the menu items.
- ValidateFile: This subroutine contains the function that the MyOnContextMenuPointSelected routine executes when you click the new menu item. The function validates the selected ATF/XML file.
Refer to the enclosed example file or to the DIAdem help for more information about using the commands.
Related Links:
Attachments:
ValidateATFXContextMenu.zip
Report Date: 08/01/2007
Last Updated: 08/16/2007
Document ID: 4C03BHFN