LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I automatically create the files with serie-name?

Hello, Everyone,
 
I have a question again.
 
How can I automatically create the file with a serie-filename?
 
e.g. I have a program, it will repeat 5 times, and every time it will create a bmp-file, and I want to let this program automatically save these 5 files with a Serie-filename like File001.bmp, File002.bmp, .... File005.bmp.
 
How can I do it?`
 
Thanks a lot.
 
Regarts,
 
Johnny
0 Kudos
Message 1 of 9
(3,478 Views)
Hi Johnny,

use a "format into string" with "File%04d.bmp" as format code and wire the loop iteration count to it's input. The result will be the filename...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,476 Views)

Hello,

can you send me an example for that?

Thanks.

 

 

0 Kudos
Message 3 of 9
(3,450 Views)

Hi

See the example code for the above suggestion...

Regards

 

0 Kudos
Message 4 of 9
(3,429 Views)
Hi Deepu,

you should avoid using string functions to build full path! Use path constants ("C:\") and a "build path" node!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 9
(3,420 Views)

Thanks Gerd, here is the updated pic...

0 Kudos
Message 6 of 9
(3,414 Views)
Hi Deepu,

one more comment Smiley Very Happy
The format code should be "%04d" to get leading zeros and have filenames with same length...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(3,405 Views)
Oh yeah!...
Thanks again... hahaha
I was actually searching for something while drawing that code... silly me...
anyway, I think since your comments are there, I will not post one more pic (to avoid more mistakes hi hi...).
Hope those looking for info will read the comment as well...
 
Regards
0 Kudos
Message 8 of 9
(3,400 Views)
Hello,

thank you for your reply, it works perfect, thanks a lot.


Regarts,

Johnny
0 Kudos
Message 9 of 9
(3,389 Views)