Jump to content
News about the LabVIEW Wiki! Read more... ×
hooovahh

[CR] Variant Repository

Recommended Posts

I thought it might be (I do have it installed), but it behaves much nicer than any XControl I have come across (no usual edit time strangeness I am used to with XControls), and is that not a Probe?

OK, done some digging, seems like it definitely this. Thanks James (and Ton and Brian)

Edited by Neil Pate

Share this post


Link to post
Share on other sites

I try to never miss out on an opportunity to toot Ton's horn when it comes to that XControl.  Yes as already mentioned the Variant Repository that is available for download here is a VIPC, which contains the Variant Repository, and the Variant Probe.  I included it because I felt that XControl really is a simple way to view variant data and it's structure, which is why it was included as an example showing how Variant Repositories work.  When I give my XNode presentation, I start by explaining how they are related to XControls, and I use the Variant Probe as the example XControl.  It's a perfect XControl, it's use cases are relatively small, you don't have lots of weird user interactions to worry about, and it displays data in a way on the UI that is more clear than any other native control.

But do be aware that there is a bug with the Variant Probe, and updating it often in a loop will cause a very slow memory leak which will cause LabVIEW to take a longer than expected time to close.  I reported the bug here but no new package has been made, so I just posted an update with the fix in the package.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks, I am now experimenting with using a variant to store quite all of my global system data, and this tree is a really neat way to show everything (for debug/dev purposes).

I would have had exactly the same bug, so I have updated my package with your fix.

Share this post


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

Thanks, I am now experimenting with using a variant to store quite all of my global system data, and this tree is a really neat way to show everything (for debug/dev purposes).

I would have had exactly the same bug, so I have updated my package with your fix.

Is the Variant Tree indicator available in the Dev environment?  Not sure I remember correctly, but I thought after looking into using it in a program I found the primitive only ran if it was a probe.

Share this post


Link to post
Share on other sites

The tree is just an xnode if I remember correctly. I know I pulled it out for a similar purpose and it worked fine -- one small issue i think related to empty variants, or variants of variants, something like that, but otherwise great.

Share this post


Link to post
Share on other sites

I've used the Variant Probe as a probe (in the development environment) but also used it on the front panel of a VI, and in a VI that is built into an EXE without any issues.  I used it in debugging messaging data between parallel actors in the EXE, so I could see a history of the messages that were send and received, and the data in the messages.  It wasn't used too often, but made it possible to get an understanding of what the individual actors were sending, and thereby what they were doing without a full development environment.

Share this post


Link to post
Share on other sites
6 hours ago, bbean said:

Is the Variant Tree indicator available in the Dev environment?  Not sure I remember correctly, but I thought after looking into using it in a program I found the primitive only ran if it was a probe.

Ditto to what the others have said. I have not yet tried building my application but just dropping the XControl down on the FP works almost as expected. One minor thing which I have not investigated the reason for yet is that you cannot resize the tree column widths.

I am probably going to modify it a bit as I want to actually use it as a GUI component and I don't want it displaying the text "Attributes" and a few other things.

Share this post


Link to post
Share on other sites
1 hour ago, Neil Pate said:

One minor thing which I have not investigated the reason for yet is that you cannot resize the tree column widths.

XControls don’t automatically save display properties of their contained controls; one has to explicitly save/load in special methods of the XControl.  A big pain, given the large number of properties.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.