Jump to content
Yagnik_Patel

Cluster to tree and then tree to table

Recommended Posts

Thanks Yagnik.

The tree control is not a nice thing to work with, I fear you are trying to do too much at once.

I think perhaps you need to start off a bit smaller. If you really really want to include the enum items in the table first try and get it working as a 2D string array. I mean not using any of the code you have been, just by figuring it out yourself. You can achieve what you want with a single enum and a nested for loop. Once you have that working you can figure out how to get that integrated into the cluster viewer code you have.

Share this post


Link to post
Share on other sites

Thank you for the direction. I really appreciate you help all the time. But I also need to finish my project in time so I have to try this example as well. :)  I am trying to learn the concept and also the finish my work together. thank you all experts for your direction all the time.

Share this post


Link to post
Share on other sites
16 minutes ago, Yagnik_Patel said:

But I also need to finish my project in time so I have to try this example as well. :)  I am trying to learn the concept and also the finish my work together.

You need to learn to crawl before you can walk... perhaps somebody in this forum will just show you the answer you are looking for (i.e. do your work for you). I am not that guy though, sorry.

  • Like 1

Share this post


Link to post
Share on other sites
34 minutes ago, Neil Pate said:

You need to learn to crawl before you can walk... perhaps somebody in this forum will just show you the answer you are looking for (i.e. do your work for you). I am not that guy though, sorry.

Dear Neil Pate, I dont want answer. I just want your advice and suggestions of you and all other experts. I always be thankful to you for discussion. Big Thaaaaaaaaanks

Share this post


Link to post
Share on other sites

I have given you my advice. Try implementing it as a 2D string array first. Leave the tree out of it.. Once you have mastered that you can think about getting it working in the tree.

As I said way earlier on in this thread I really think you are "mixing methaphors" here. The cluster viewer displays the "values" of items in the tree, not the set of all possible items. If you want that you are going to have to add it yourself and the tree API is not pleasant to work with.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Neil Pate said:

Thanks Yagnik.

The tree control is not a nice thing to work with, I fear you are trying to do too much at once.

I think perhaps you need to start off a bit smaller. If you really really want to include the enum items in the table first try and get it working as a 2D string array. I mean not using any of the code you have been, just by figuring it out yourself. You can achieve what you want with a single enum and a nested for loop. Once you have that working you can figure out how to get that integrated into the cluster viewer code you have.

I am trying to execute this Code to get Enum Element to array according to your suggestion.

 

Enum to String.png

Share this post


Link to post
Share on other sites

Ignoring the fact that your array is not doing anything at all (you could just wire the Array indicator straight to the Strings[] output) you said you wanted to show the value as well, with 0 or 1.

Share this post


Link to post
Share on other sites

@Neil Pate: Yes, I also need to show the value by 1 and 0, but source for value 0 and 1, will be the same cluster which posses Enum too. I try to make you understand my problem with screenshot. How do I get the Enum Values and boolean value in the same array. 

looping time.png

Share this post


Link to post
Share on other sites

Ok so lets try and make this as simple as possible. Imagine all you have is a single constant value of your International thankyou enum on your block diagram. I get the feeling you would like to display this as a 2D string array with the first column listing all the possibilities of the enum and the second column has  "1" in the column of the row that matches the constant value otherwise it has a 0, is this correct?

Can you describe in words how you would create this array?

Share this post


Link to post
Share on other sites

 

14 hours ago, Neil Pate said:

Ok so lets try and make this as simple as possible. Imagine all you have is a single constant value of your International thankyou enum on your block diagram. I get the feeling you would like to display this as a 2D string array with the first column listing all the possibilities of the enum and the second column has  "1" in the column of the row that matches the constant value otherwise it has a 0, is this correct?

Can you describe in words how you would create this array?

Yes. Exactly!!! this is what I am thinking. But Source should be Cluster. Screenshot may clear my idea

 

14 hours ago, Neil Pate said:

display this as a 2D string array with the first column listing all the possibilities of the enum and the second column has  "1" in the column of the row that matches the constant value otherwise it has a 0

 

Storing value from cluster Boolean&Enum to Array.png

Share this post


Link to post
Share on other sites

Manually right now just to show my idea. But I want to do this with code. What kind of nested looping should I do so that I can Read and Write the selected Row and Column of the 2D array ?

Edited by Yagnik_Patel

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
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.