cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

string to number

 
 
 
Hello sir,
 
              i need to increment  string for using as an filename.   000 to 001...... n so on
Please help me to do so..
 
 
Regards

Tiju Thomas
0 Kudos
Mensagem 1 de 11
4.707Exibições

Hi TIJU,

you can use the function "format into string". see the attached example. Hope it helps.

Mike

0 Kudos
Mensagem 2 de 11
4.703Exibições
Hi tiju,

where exactly is your problem?

For incrementation you find a "+1" function in the mathematics palette. For string to number conversion you can use "Scan from string" or several format specific functions from the string palette... To get the filename you can use the "strip path" function from the files palette!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Mensagem 3 de 11
4.701Exibições
Hi!
   I'd suggest:


graziano


Message Edited by Graziano on 03-28-2008 05:16 AM
Baixar tudo
0 Kudos
Mensagem 4 de 11
4.694Exibições
Hello Mr Graziano..
 
 
   This is want i looked for..thanks for ur help..revert back to u for help if i need..
Thank u once again..
 
TIJU
Regards

Tiju Thomas
0 Kudos
Mensagem 5 de 11
4.680Exibições
Hi Graziano,

you can delete the "concat string" when you use a format string of "file%03d.ext"...
Or even better: use a format string of "%s%03d.%s" and wire filename (before number) and extension to the additional inputsPiscadela do Smiley

And when there is only one number in the filename (or it is separated by other chars than 0-9) you can use a "split string" function with just the offset, the conversion to number will stop at non-decimal characters. You may use a "scan from string" with format "%d" and wired offset instead.


Message Edited by GerdW on 03-28-2008 11:39 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Mensagem 6 de 11
4.679Exibições
 
Thank you      Mike..
 
Thank you   GerdW
 
 
Regards

Tiju Thomas
0 Kudos
Mensagem 7 de 11
4.672Exibições
Yeah i needed only that number string to increment ,so i removed other stuffs in concatnate string.
Ok i'll better do that way..i need auto formating the string ie..
 if starts with  0..  1....2     incrementing....
                      00 ...01..02...
                      000...001...002..
  like this..
Regards

Tiju Thomas
0 Kudos
Mensagem 8 de 11
4.670Exibições

Hi TIJU,

to be more flexible you can use something like this.

Mike



Message Edited by MikeS81 on 03-28-2008 11:59 AM
0 Kudos
Mensagem 9 de 11
4.666Exibições


@GerdW wrote:
Hi Graziano,

you can delete the "concat string" when you use a format string of "file%03d.ext"...
Or even better: use a format string of "%s%03d.%s" and wire filename (before number) and extension to the additional inputsPiscadela do Smiley



Hi GerdW!
   thanks, I learned something!!!!!

   Due to memory leaks (i.e. my brains always stills useful informations, or I have a brain-integrated excellent garbage collector which runs at realtime priority Smiley feliz ), I never remember format string stuffs!  One day I'm going to write a paper with examples on format strings (many things are not well documented, imho), and I'll put this!

graziano
0 Kudos
Mensagem 10 de 11
4.659Exibições