LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CBlum

Index Array with type conversion function like “Scan from String"

Status: New

Index Array with type conversion function like “Scan from String”

original.png

15 Comments
RavensFan
Knight of NI

"Conversation"  or do you mean "conversion"?  (You may want to ask the moderator to edit your post so that it can be searched for properly.)

 

It looks like you are trying to make a LabVIEW primitive work differently in the lower image than it usually does.  It looks like you are trying to use a Scan from String function which works on strings and make it work on multiple elements of a 1-D string array?

 

I agree the lower image "looks" better in that it is more compact, but it feels to me like it would add some confusion as to is happening because of the Scan from String function being used.

CBlum
Member

Yes, please changed it.  No it should not be used the string function, it must be changed the function symbol to array. You are right..

 

Darren
Proven Zealot

CBlum, I fixed the misspelling. If you want me to replace the image in the post with one that includes the array function imagery in the second picture, then post an updated image as a comment and I can update the image in the original post.

CBlum
Member

Unbenannt.PNG

AristosQueue (NI)
NI Employee (retired)

CBlum: I honestly cannot imagine a scenario where such a primitive would be useful. It certainly doesn't seem common enough to warrant a primitive to accelerate the effort. Where do you imagine this primitive being used?

CBlum
Member

If you load from a file, you have to convert the spreadsheet array of string into a cluster. Or you have a HMI, for example, "Multicolumn listbox" (array of string), then you're not always convert the value?

AristosQueue (NI)
NI Employee (retired)

I can see your rationale, but I would rank both of those as pretty rare, sufficiently so that I wouldn't consider it worthy of a language primitve. We'll see if it picks up kudos from other users, but my instinct is to decline the suggestion.

tst
Knight of NI Knight of NI
Knight of NI

Additional use case - selecting data from a database. You get a bunch of columns of different types which come in as variants and you want to convert them to specific types.


___________________
Try to take over the world!
Intaris
Proven Zealot

Most databases these days offer interfaces to retrieve strict datatypes.....

tst
Knight of NI Knight of NI
Knight of NI

I'm not familiar with this. I know of SQL, which returns record sets, which in ADO are returned as variants or strings. How would something like this translate to LV?

 

Incidentally, it's certainly possible to do something along the lines of the various OpenG variant config VIs or JSON converters, etc., where you feed in a cluster and say "this 1D array of variants maps to this cluster", but that requires using such code and could have performance implications, so it might not be practical in all situations. It also doesn't imply any changes on the DB side.


___________________
Try to take over the world!