LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extract string within parenthesis into a numeric array

Solved!
Go to solution

I have unity x,y,z coordinates of a gameobject being sent to labview through a UDP connection.  The string looks like this ex. "(4,-5,6)".  The values are sent over within the parenthesis and I don't know the exact format specifier to put in my VI so that it takes the values within the parenthesis and puts it into an array.  What I have so far only receives the x value but places it in the wrong array index and completely ignores my y and z values.  Thank you for your help in advance.   

0 Kudos
Message 1 of 6
(2,970 Views)
Solution
Accepted by topic author pphatara48

Try this.


Sample.png

Message 2 of 6
(2,958 Views)

Do what clnglenn did

Message 3 of 6
(2,954 Views)

Or do this if the number of item can vary.

 

BenoitUntitled.png

Message 4 of 6
(2,918 Views)

Thank you so much for responding so quickly!  This solution worked perfect!!! I can't believe the formatting was that simple.  I feel so silly. 

0 Kudos
Message 5 of 6
(2,874 Views)

Thank you so much for your suggestion.  I might use this if I plan on sending both gameobject transform and rotation coordinates from unity which would increase the number of items in my string.  Since I'm only sending transform coordinates the first solution worked great. 

0 Kudos
Message 6 of 6
(2,872 Views)