LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert 2D Array into 1D Array with Concatenate

Solved!
Go to solution

Hi,

 

i want to retrieve all the rows from the 2D array and concatenate and form as 1D array. How can it be achieved. Attached a sample input and expected output format. Can someone helpout.

0 Kudos
Message 1 of 12
(6,278 Views)
Solution
Accepted by topic author Technical_details

Hi detail,

 

autoindex each row, then use ArrayToSpreadsheetString. Cleanup the string using TrimWhitespace (to remove trailing EOL chars):

check.png

This was an easy homework, wasn't it? 😉

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 12
(6,265 Views)

Hi Gerd

Wow that was a great solution. thanks 

0 Kudos
Message 3 of 12
(6,244 Views)

Hi,

 

The same data if i require without the '-' how could i get it. Instead of 0-1-2-3 if i need to get as 0123.

0 Kudos
Message 4 of 12
(6,230 Views)

Hi details,

 

use ConcatString instead of Array2SpreadsheetString…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 12
(6,224 Views)

@Technical_details wrote:

Hi,

 

The same data if i require without the '-' how could i get it. Instead of 0-1-2-3 if i need to get as 0123.


Use Empty string as separator.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 12
(6,210 Views)

Yamaeda a écrit :


 

 

Use Empty string as separator.


No that doesn't work, it will add the default separator (tab) in this case.

 

Ben64

0 Kudos
Message 7 of 12
(6,196 Views)

So let it be tab separated and add a Search and Replace with empty string. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 12
(6,181 Views)

Or better, change the Array to Spreadsheet string to a Concatenate strings.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 12
(6,179 Views)

Hi Yamaeda,

 

why not redirect to message #5?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(6,176 Views)