09-06-2005 06:47 AM
09-06-2005 06:59 AM
I don't know if there is any expression which can detect a space not preceded by a comma, but in any case I would suggest that you find another way. If you want the users to enter multiple values, let them use an array of numerics or a repeating numeric control. Don't give the user the option to make a mistake.
You can remove and add values from\to the array, control its visible size and control its visible elements by using property nodes.
09-06-2005 07:12 AM - edited 09-06-2005 07:12 AM
Why not simply use space delimited entries. This way you avoid having to place a comma.
But the better approach is what tst is recommending. If you have an Operator (User) Interface, simply have them enter numbers in one manner and format the string within your vi. This eliminates (reduces?) bad entries. You can also do entry checking before appending the new value to the string. Did tst suggest using an array instead of using a string? (Yes, tst did) You should consider putting the values into an array9 or arrays?), then you can manipulate the data more efficiently in the future.
JLV
Message Edited by JoeLabView on 09-06-2005 08:13 AM
09-06-2005 07:14 AM
09-06-2005 07:29 AM
09-06-2005 07:30 AM
Thanks to all. I know that a good solution would be to insert this values in another way. The problem is that the program is allready done, I´m just solving some bugs, and it would be too hard to change the code to update it in that way.
Anyway, thanks for your suggestions!
09-06-2005 07:44 AM
Shane, looks quite good, but gives False when there is only one value (what can be also possible and correct)
09-06-2005 08:22 AM
09-06-2005 08:25 AM
In that case, I would say use Spreadsheet string to array with a space as the delimiter. The commas will be ignored.
This is still not a real solution, because the operator could have other mistakes.
The only really good solution, once again, is not to give the operator the chance to make a mistake. If at all possible, you should modify this to work with numbers and not with strings.
09-06-2005 08:40 AM
Yes, Shane. But to have or not the space is not a problem, the only point is the coma, which works as a delimiter. So either (10,-30,15) or (10, -30, 15) are correct. I´ve tried to modify your code by myself and don´t disturb u more (u have allready do a lot), but I get really nothing (I don´t understand what is behind u have done
)
Is possible to modify it? When not is ok, and i will use this version.