I’m not 100% sure I follow. So your string is:
And you want to add up the numbers, correct? So you want an output to be 60?
If so, you should not be using the Substring method at all. Just split the string by newline into an array of strings, then use a for each activity to add each line.
For Each num in Strings.Split(out_TextFile,environment.newline)
If IsNumeric(num) Then
Assign SumOfTextFile = SumOfTextFile + cdouble(num) // This assumes SumOfTextFile is of type double. You could also have it be integer or decimal or whatever numeric type you prefer
This would iterate through each line and add them up (assuming the text is just a number).
If it’s possible your input text may contain letters and not just numbers on a plain line, then you may wish to use regex instead. The idea would be the same, but instead of iterating through an array of strings with strings.split() you would instead iterate through an array of regex matches found with regex.matches()