DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Browse files with a DIAdem GUI button

I'm trying to create a 'browse for files' functionality in a DIAdem GUI. I've got a Button set up next to an EditBox, and would like to have the user click the button and browse for a file, and then have the chosen filepath displayed in the adjacent EditBox. I'm new to DIAdem and VBS scripting and could not find much useful documentation on how to do so in the 'help' files. Any advice? Thanks
0 Kudos
Message 1 of 3
(3,101 Views)

Hi d_gum,

 

I know it's not exactly what you want, but there is a shipping example that's very close to what you want to do. The example is located in Procedures » Creating Scripts » Working with Files » Opening a File Selection Dialog Box. It simply launches the File Selection Dialog Box, allows you to select a file, then displays the name of the file with its file path in a dialog box.

 

If you have any questions about how to edit this example to work with your View objects, feel free to post on the forums!

 

Regards,

 

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(3,053 Views)

There are two command that you might call

Option Explicit

if "IDOk" = FileDlgShow(DataReadPath, "MyFile (*.csv),*.csv", "Select a file", false) then
  MsgBox FileDlgNameList(0)
end if

is the simple one.

FileNameGet

is the one with much more capabilities. Please check help for it.

0 Kudos
Message 3 of 3
(3,047 Views)