ni.com checkout is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an array constant with n-elements - best practice (by VIScript ;))

Hi guys,

i have struggled around with this topic for half of a day... finally i found a solution that works out for me, but i guess there is a better solution.

My goal what i actually want to do was just to create an string array constant with n-elements of data i want to define.

My first approach was to create a string array constant on the block diagram by scripting - no problem here. But i failed in edtiting the array, or in other words: i couldnt fill the array with values, or at least initialized an value of the array. (Errors like "This function is not implemented yet" or Labview crashes where the reasons)

So i ended up in the solution below (attached image):

I create two string array constants - one "working copy", one target. Then i convert the working copy into a frontpanel element an fill it with my pre defined values. Afterwards i copy the data from the working copy to the target, and in the end, the vi deletes the working copy.

My question: Is there a simpler way, or has anyone made experiences made about editing/creating array constants on the blockdiagram?

Looking to hear from you.

Cheers Chris

0 Kudos
Message 1 of 2
(4,425 Views)