LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

implimante Header Row for array

Solved!
Go to solution

Hi

I want to know how to insert Header Row to an array of double  ? 

0 Kudos
Message 1 of 6
(450 Views)

Hi Emna,

 

as long as that "header row" only contains even more DBL values you could use BuildArray to prepend one more row to your 2D array.

 

When those "header" should consist of strings you could

  1. convert your DBL array to a string array and prepend your string header row
  2. use a Table or MultiColumnBox to display your data and use their (separate) header row property
Best regards,
GerdW
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 2 of 6
(430 Views)

Do you mean you want to insert a double value at the beginning of the array? Then use "build array".

 

Do you mean that you want a list or table of the values with a header on top? Then use a listbox or table and put the values there.

 

Please show some code and explain what you want if this answer is not enough.



Certified LabVIEW Architect

G# - Award winning reference based OOP for LV, for free! VIPM Github
Message 3 of 6
(429 Views)

@Emna20 wrote:

I want to know how to insert Header Row to an array of double  ? 


Wild guess because you don't give sufficient information:

 

For display, you can format the array as 2D arrays of strings, use a table indicator, and show the header row.


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 4 of 6
(406 Views)
Highlighted

Hi 

i find two solutions .

1) the first solution is to convert the array of DBL to an array of string and after that, use build array function to concatenate the array with the header .

Capture1.PNGCapture2.PNG

2)  the second solution is to convert the array of DBL to an array of string and after that , use table from (List table, & Tree  palette)  to add header go to Properties.

Capture3.PNGCapture4.PNG

 

 

0 Kudos
Message 5 of 6
(371 Views)
Solution
Accepted by topic author Emna20

@Emna20 wrote:

Hi 

i find two solutions .


Your solutions are extremely convoluted and parts of the code make no sense at all. Why do you think you need to go from array to string and back to an array? That's a lot of expensive processing. Also, "%2.1" is NOT a valid format. Fortunately, the function ignores illegal formats and treats it as "%s" here..

 

Here's how you would do it instead. Much simpler! Same result. (See also)

 

Headers.png

 


LabVIEW Champion. It all comes together in GCentral GCentral
Message 6 of 6
(355 Views)