Popular Post sam Posted July 7, 2022 Popular Post Report Share Posted July 7, 2022 (edited) 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!  Edited July 7, 2022 by sam 3 4 Quote Link to comment
X___ Posted July 9, 2022 Report Share Posted July 9, 2022 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?  Quote Link to comment
infinitenothing Posted July 20, 2022 Report Share Posted July 20, 2022 Good tip. I hate type guessing. I'm looking at you TDMS Pallet. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.