From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,972 Views)
Solution
Accepted by topic author pphatara48

Try this.


Sample.png

Message 2 of 6
(2,960 Views)

Do what clnglenn did

Message 3 of 6
(2,956 Views)

Or do this if the number of item can vary.

 

BenoitUntitled.png

Message 4 of 6
(2,920 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,876 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,874 Views)