From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically generating click on path controls browse button

How can I (programmatically) achieve the effect of clicking on the browse button of a path control (from within another controls (value change) event case)?
Thanks for your time and effort!
0 Kudos
Message 1 of 7
(5,195 Views)
Hai,
 
First try to make ur questions clearly understandable. Break it to short sentences.
 
Let's come to ur query.
 
You can use the GetForgroundWindow function and the GetWindowText function from the user32.dll.
 
Try this out and post if any more help needed.
 
Regards,
Mathan
0 Kudos
Message 2 of 7
(5,187 Views)

Use the "File I/O >> Advanced File Functions >> File Dialog" to select a path and then wire that path, to the "path control" button .

Is it what you need?

0 Kudos
Message 3 of 7
(5,185 Views)

Hi rashid,

like i understand your question you should use the "Value (Signaling)" property. Hope this helps.

Mike

0 Kudos
Message 4 of 7
(5,181 Views)


@Pnt wrote:

Use the "File I/O >> Advanced File Functions >> File Dialog" to select a path and then wire that path, to the "path control" button .

Is it what you need?



Pnt is right (I guess).




Message Edited by TonP on 03-25-2008 12:47 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 7
(5,176 Views)

Yes, there is no function to programmatically hit the "browse" button and show a file or folder selection dialog according to the PathControl's SelectionMode property. Normally you would expect a callable method for the reference.

Therefore, I wrote a VI that does this as best as it can. Here: Saved for LabVIEW2010.

See http://www.tu-chemnitz.de/~heha/mb-iwp/LabVIEW/path.zip/

Moreover, I wrote another VI that checks whether path given is valid for the current SelectionMode property, and if not, call the file/folder selection dialog.

Some (rarely used) SelectionModes are not handled in this example. The different modes require a quite large case selection list because the file selection dialog box cannot be set-up programmatically.

To save VI size, I choosen the old-style yellow file/folder selection VI, not the blue Express VI.

Message 6 of 7
(4,168 Views)

What is the effect of clicking on the browse-button of a path control? A File-Selection-Dialog or Directory-Selection-Dialog is showing up.

You can achieve this, as mentioned before, with the "File Dialog"- Express-VI or just the execution of Open/Create/Replace File or Read/Write to/from Binary/Text - File with the Initial Path input left unwired.

 

oops, now I see this is a very old thread Smiley Sad

 

Greets, Dave
Message 7 of 7
(4,162 Views)