Jump to content

Did you know you could do that? RE: Spreadsheet String to Array

Recommended Posts

On 7/7/2022 at 12:06 PM, sam said:

I've been surprised today with one of the LabVIEW's most useful functions (imo) which I use all the time.  After so many years and only now seeing this behavior/feature.  I thought I share it 🙂

I've always used an empty array of N-Dim for my desired type input.  only to accidently find out today that I can also use a scalar for the type.    ha!


But if you provide a string that should be interpreted as a 1D array, and chose "create indicator", the created indicator is a 2D array:


Try to force the output to be 1D by connecting a 1D array indicator, and you get a broken wire:


In other words, it seems that if you want a non 2D output, you need to specify the type.


BTW, in the first diagram above, the 2D array output contains a single row, so the string is properly decoded (ignore the missing format string).

Bonus: did you know that if you set the expected type to be 1D (and obviously the output to be 1D), a "2D" string will be cast to 1D?



Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.