Showing results for 
Search instead for 
Did you mean: 

Programmatically resize array element

Go to solution

Hi, I need to resize programmatically the element of a Matrix. The External frame of the matrix control should hold the same size, but the internal element should chang their size programmatically.




I did not find any property/method to do this. Expect using Xcontrol I guess.


Any idea?


Thank you.


0 Kudos
Message 1 of 4
Accepted by topic author logatto

From your image you inserted, i take it that your 'matrix' is a 2D array LED display.


In order to resize these elements while maintaining the "original size of the matrix", you have to implement two steps:

1. Resize of the LEDs:

  • Get ArrayElement reference
  • Cast the reference to Boolean
  • Set the width and height for the Boolean to the new value

Please note that now the size of ALL LEDs change. This is because all elements of an array share the same properties (including size) with the exception of the "Value" property!

Also, the Array shell resizes as it still displays the same amount of LEDs (columns, rows)


2. Calculate the new number of columns/rows to keep the Array shell at about the same size

  • Calculate the multiplier for the resize in each direction (making LED smaller to half size has the multiplier of 2 for number of rows/columns each)
  • Multiply the number of rows/columns by that multiplier (rounding???)
  • Set the dimension size property for the array shell to the new values


Please note that this will "resize the array to about the same size it previously had". Resizes due to rounding issues very likely (there are no 0.5 LEDs available!)



CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4

Thank You.


I did not find the reference for the element. It is the very first of the list Smiley Frustrated


0 Kudos
Message 3 of 4

Hi logatto,


the element reference is a property of the array…

Best regards,

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4