01-16-2019 01:40 AM - edited 01-16-2019 01:42 AM
this file is older version, how i should open this? any suggestion
01-16-2019 01:55 AM
01-17-2019 09:30 PM
could you please convert it to for me. i tried many times but i didn't converted. Thanks
01-18-2019 08:59 AM
@sam67 wrote:
could you please convert it to for me. i tried many times but i didn't converted. Thanks
To quote GerdW,
(When you want something else you should ask more specific!)
01-21-2019 03:14 AM - edited 01-21-2019 03:15 AM
Hey sam67,
Is it maybe the other way round? altenbach's file Match_in_case_struct_MODCA.vi is stored in LabVIEW 2017 format and opens perfectly fine in LabVIEW 2018. Please let us know which version you are using and what error message you get. Otherwise helping or even converting it (to what?) is impossible.
01-21-2019 03:33 AM
Hello altenbach,
I just noticed you demo code does not work as intended (the algorithm itself is fine and neat though!):
The first row of the string array and variant names are a single character each, whereas the string that comes from the Front Panel Control contains a LF as well. Get Variant Attribute cannot find "A\n" for "A" and therefore returns "<not found>" all the times.
Just in case anyone needs this: Either removing \n from the input string, or (worse) adding \n to each of the variant attributes names would solve this. In case you are not using a String Control, but a constant on the Block Diagram, the example works as posted.
04-18-2022 05:47 PM - edited 04-18-2022 05:50 PM
@ikaiser wrote:
The first row of the string array and variant names are a single character each, whereas the string that comes from the Front Panel Control contains a LF as well. Get Variant Attribute cannot find "A\n" for "A" and therefore returns "<not found>" all the times.
(Sorry, reviving an old discussion. Did not notice your comment earlier)
No, my string control is se to "limit to single line", so it is not even possible to enter a newline character via keyboard. Now sure how you even get a newline character in there.
Ah noticed that the default value for the string is \n, that needs to be corrected!
In any case, all this should be done using Maps now (LabVIEW 2019 and newer).
04-18-2022 10:02 PM
Hi,
I don`t realy undersatand the problem that you face , but if you want to search an items in a 2 D array, you find below a vi.
Best Regards,
thank you.
kudos 🤗
04-19-2022 01:39 AM
@Emna20 wrote:
Hi,
I don`t realy undersatand the problem that you face , but if you want to search an items in a 2 D array, you find below a vi.
🤗
I agree that you did not understand the problem of this old discussion and your VI solves a very different problem.
"Search array" scales with O(n) while lookups in maps (or variant attributes) scale with O(log2(n)), and are thus many orders of magnitude faster for large datasets.
04-20-2022 02:36 PM
Hi altenbach,
long time no see (-:
Thanks for your reply despite reviving the zombie thread - default values are a tripping hazard in every programming language I know 🤷 So it's good you gave the hint on the issue in the demo code. And the update towards Maps.