02-23-2023 09:38 AM
I have a cluster, named graphmap, of strings and 4 text rings as shown below. The text rings have not items.
I set the Strings and Values property of the rings programmatically, and initialize an array of clusters with the initialized cluster. The block diagram is shown below.
In the first frame I setup an array of strings and values pairs as required for Strings and Values property of a ring. In the first frame of the second frame I initialize graphmap cluster and set the strings and values of the 4 rings in the second frame. After initialization of the graphmap cluster is correct as shown below with ring items set to correct values.
However, the rings in the clusters in the intialized array grdefarray are empty as shown below
What am i doing wrong?
Thank you.
Girish
02-23-2023 10:03 AM
Hi Girish,
@girish53 wrote:What am i doing wrong?
You forgot to attach real code.
You use too many locals and frames.
You don't clean up the code.
You initialize the cluster with apparently empty ring, then you create an array of that cluster...
02-23-2023 10:40 AM
The contents of the rings are based on the selections made by the user in the other parts of the vi. That is why I assemble the latest list in the first frame, and then initialize the the graphmap cluster using the current state. Unfortunately I cannot send the code because it is part of a much larger vi. I am trying figure why the graphmap cluster gets correctly set, but the clusters in the array created using graphmap are not correctly set.
Thank you for your help.
Girish
02-23-2023 11:10 AM - edited 02-23-2023 11:12 AM
@girish53 wrote:
What am i doing wrong?
Everything!!!!
As has been said, you need to attach your code and explain in detail what it should do. Make sure all controls have reasonable default values.
In terms of LabVIEW, start with a few simple tutorials. There are just way too many glaring Rube Goldberg constructs in your code.
02-23-2023 02:34 PM
@altenbach wrote:
@girish53 wrote:
What am i doing wrong?
Everything!!!!
As has been said, you need to attach your code and explain in detail what it should do. Make sure all controls have reasonable default values.
In terms of LabVIEW, start with a few simple tutorials. There are just way too many glaring Rube Goldberg constructs in your code.
- blatant overuse of local variables everywhere
- pointless sequence structures
- index array is resizable
- questionable array operations and loops.
- all that duplicate code!
Nice bullet points. If only I had a way of hammering them into my cow-orkers’ little heads.