Jump to content

Cluster to tree and then tree to table


Recommended Posts

Hello everyone, 

I am designing a project in which I need to variant data from cluster to tree view and then transfer name, value and tag from tree to table with drag and drop option as well as select individual cell option. I am attaching my example VI. But it needs OpenG stuff to execute so kindly take notice of it. Can anybody help me because i am not good enough with OpenG VI ?

Thanks in advance 

Cluster to Tree and Tree to Table.zip

Link to comment

Your zip is all messed up, so many dependencies in the wrong place etc. Take a look at the Files tab in your project to see where all your files are. You need to include everything not in the LabVIEW directory if you want somebody else to check it out.

Also, why are your OpenG VIs not inside the LabVIEW directory?

Link to comment

OK so that is better, although still I would ditch the OpenG directory and just install them properly.

So I don't really understand your question. The Tree is a representation of your cluster, the hierarchy of the tree (parent/child relationship) represents the nested clusters and values. The value column shows the actual value of each element, this appears to be working correctly.

What are you trying to achieve? Can you post a screenshot of what you would like to see?

Link to comment
On 11/2/2016 at 6:44 AM, Yagnik_Patel said:

Hello everyone, 

I am designing a project in which I need to variant data from cluster to tree view and then transfer name, value and tag from tree to table with drag and drop option as well as select individual cell option. I am attaching my example VI. But it needs OpenG stuff to execute so kindly take notice of it. Can anybody help me because i am not good enough with OpenG VI ?

Thanks in advance 

Cluster to Tree and Tree to Table.zip

Just based on your description, it sounds like you should start with this:

it takes a variant and there is a function in there which converts the variant into a tree. There is a class in there (VariantTree__VP) which has a method for setting what tree the class is pointing to (property node) and then a function BrowseVariant which populates the tree with the data in the variant.

Once in tree form, its just a bunch of strings and should be easy to access in whatever way you want. This includes the built-in labview functionality for drag and drop between trees and tables. If you need more custom behavior, you can implement the drag and drop events as described here: http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/drag_and_drop_programmatic/

Edited by smithd
Link to comment

smithd, Ton's variant probe is great but does not do any more than the Cluster viewer class at the OP included. His question was related to the desired to display enum values as children and not in the value column, and I am trying to understand why this is desirable as an enum is not a collection of values at runtime (like a cluster or array).

Link to comment
15 hours ago, Neil Pate said:

OK so that is better, although still I would ditch the OpenG directory and just install them properly.

So I don't really understand your question. The Tree is a representation of your cluster, the hierarchy of the tree (parent/child relationship) represents the nested clusters and values. The value column shows the actual value of each element, this appears to be working correctly.

What are you trying to achieve? Can you post a screenshot of what you would like to see?

Hereby I am attaching the screenshot what I expect with little reason about why I want that !!!. Thank you xperts

demoVI 2.png

DemoVI.png

Link to comment
12 minutes ago, Yagnik_Patel said:

@Neil Pate: As the Config cluster( current example) is my Process Image of the system, so Enum values are my data channel. Thus once I get the treeview I can use them and I dont need the value column at all for treeview. 

Sorry, I still don't get it...

The Config cluster is your process data, ok that makes sense. But an Enum is only a single value, it is not multiple values, why are you trying to display it as multiple values?

Link to comment
2 minutes ago, Neil Pate said:

Sorry, I still don't get it...

The Config cluster is your process data, ok that makes sense. But an Enum is only a single value, it is not multiple values, why are you trying to display it as multiple values?

Dear Neil Pate, 

As to initialize my project, I need to display all possible value of enum in treeview. Maybe my Screenshot will make it more clear. Thank you!

Just for Enum.png

Link to comment

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.