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: 

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
(673 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 LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(671 Views)