LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D Array of Strings to Tree Control

Solved!
Go to solution

From a SubVi I get a 2D array of string elements that look like:

A 1 a

A 1 b

A 2 a

A 2 b

B 1 a

B 1 b

C 1 a

C 2 a

I'd like to turn this into a tree that would look like:
A
>1
>>a

>>b

>>c

>2

>>a

>>b

B

>1

>>a

>>b

C

>1

>>a

>2

>>a

 

I'm trying to use the attached vi as a reference, however I'm stuck on how I can do this without creating a file/folder structure and deleting it after. 

0 Kudos
Message 1 of 4
(3,745 Views)
Solution
Accepted by topic author ATE-EGNE

Got it!

Here's the changed vi. if you have any advice on how I can improve it, please let me know

Message 2 of 4
(3,716 Views)

 

 

2D Array of Strings to Tree Control.png

This was what I first came up with before seeing your 2nd post. 

Omar
0 Kudos
Message 3 of 4
(3,710 Views)

@Omar_II wrote:

 

 

2D Array of Strings to Tree Control.png

This was what I first came up with before seeing your 2nd post. 


Your solution seems to be much more streamlined. although mine is recursive. I wonder which will be better as list size increases. I think I'll stick with mine though as it can handle different depths as well (in case I ever need one to be C 2 a i )

0 Kudos
Message 4 of 4
(3,703 Views)