LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a simple XControl for file selection.

Hello everyone.

 

I'm coming to you with such an idea:

 

I happen to access files which are not organized all the in the same way. Depending on the situation, I need to specify
- sometimes just the path of a single file (e.g. c:\data\image_001.png)

- sometimes, the folder containing a sequence of files + file extension + the number of the file I want (e.g. c:\data\ + png)
- sometimes, the folder + the number of the subfolder +  the subfolder prefix + the file extension (e.g. c:\data + subdata + 5 + png, to get c:\data\subdata_05\ )

-etc

 

I thought it would be greate to create a control for that, so to keep the editor clean.

 

 

I created a VI doing that (see attachment), but I can not transpose it to XControl...even the examples are not useful (they use "double" data type).

 

Is any of you willingly to give me a little bit of help? 🙂

 

Thank you

 

CAPITANEVS_0-1618253510183.png

 

 

 

 

 

 

 

0 Kudos
Message 1 of 2
(115 Views)

Hi Capitanevs,

 


@CAPITANEVS wrote:

I created a VI doing that (see attachment), but I can not transpose it to XControl...even the examples are not useful (they use "double" data type).

Is any of you willingly to give me a little bit of help? 🙂


Change the datatype of your XControl to "array of path" in the "Data" typedef of that XControl…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 2
(113 Views)