LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Refnum Number of Rows size of data array

Solved!
Go to solution

I have read 

array size from refnum - NI Community

the Problem is 17 Years old and i hoped the Number of Rows/ Number of Columns Property would have fixed that but is seems these propertys only give the frontend displayed size and not the actuall data size back.

 

is there a better way to get the size of an array by refnum then flatten its value and reading the first bytes?

 

 

0 Kudos
Message 1 of 6
(2,060 Views)

If the refnum is strictly typed, the Value property will do what you want. If the refnum is a generic array, Value will return an array of Variant that you will need to convert to the actual value, element by element.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(2,056 Views)

its generic and i only know it  has 1 Dimension and it is of some generic cluster with controles in it : /

0 Kudos
Message 3 of 6
(2,021 Views)
Solution
Accepted by topic author PaulPascher

afr.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 4 of 6
(2,008 Views)

@PaulPascher wrote:

... i hoped the Number of Rows/ Number of Columns Property would have fixed that but is seems these propertys only give the frontend displayed size and not the actuall data size back.

 


That's the purpose of these properties, so there is nothing to "fix". The array size is not a property, but part of the data and you already got good suggestions.

 

(Can you explain why you think you need all that? Maybe there is a fundamentally better way to do whatever you are trying to do.)

0 Kudos
Message 5 of 6
(1,990 Views)

You'd think the Get Array Information from the Variant pallette would answer this, but alas.

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(1,939 Views)