Jump to content

Quick Drop plugin - retain data across calls


Recommended Posts

I'm trying to figure out the best way to retain data across Quick Drop plugin calls (or between Quick Drop plugin functions). So, I have essentially a global variable which I can prompt the user for the first time, or set/change from a separate command. This would allow be a convenient middle ground between hard-coding the data (thus requiring changing the actual plugin code), or prompting the user every single time. 

This doesn't seem to work with global variables, or named queues. 

What's the simplest way to accomplish this? I'm sure I can go outside LabVIEW and save to disk, or the Windows registry or something like that, but I'm looking for a way to accomplish this within LabVIEW.

Link to post
Share on other sites

My recommendation would be to save the data to disk in the LabVIEW Data folder:

<Documents>\LabVIEW Data\2019(32-bit)

There really isn't a good way to retain data across Quick Drop calls unless you do something to keep a running process in memory behind the scenes, which is a big can of worms...

Yair's solution looks great -- I wasn't aware of that nice feature!

Edited by Jim Kring
Link to post
Share on other sites
24 minutes ago, Yair said:

Global Data.Set and Get

By chance I came across those private nodes too and played with them a little. They allow to retain the data per LabVIEW process. That means, you may get access to data in any VI in any project. Feels like Tags, that are not stored inside VI DS. Neat feature, indeed.

Link to post
Share on other sites

Yup, Quick Drop itself (along with several other G-based LabVIEW features) uses Global Data Get/Set. Standard disclaimers apply (private methods are not documented or supported by NI), but these should get you what you need. I agree with Yair that you need to make sure to namespace your data appropriately so it doesn't potentially collide with other Global Data.

  • Like 1
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.