LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of Arguments for "Format into String Function" is variable

Solved!
Go to solution

Hello All,

 

             I'm using "Format Into String" in my code. The Number of Arguments/No. of Inputs and Format Specifiers are not fixed. The Inputs and String Format are coming from the Front Panel.

             I tried resolving the issue by using a for loop and indexing the input but it was throwing an error that the number of format specifiers is too many

0 Kudos
Message 1 of 5
(2,286 Views)

Well, show us your code and some typical example strings. Are there delimiters?

0 Kudos
Message 2 of 5
(2,285 Views)

Please find the code Image and Examples of Strings in the attached File.

0 Kudos
Message 3 of 5
(2,262 Views)
Solution
Accepted by topic author gargrahul

Hi gargraghul,

 

when all you do is replacing parts of strings you should use SearchAndReplace instead of FormatIntoString in the loop!

 

Otherwise you need to create an array of subset format strings as you supply an array of string arguments...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,238 Views)

I resolved the issue by using the search replace function and for loop. Thanks for your suggestions.

0 Kudos
Message 5 of 5
(2,223 Views)