Jump to content

Getting the Type String of a large Variant


asprague

Recommended Posts

I'm using the OpenG variant VIs and they're great! However (there's always a 'however') one of the clusters that I convert to a variant contains a huge amount of data. When 'Variant to Flattened String' started running out of memory I realized that there was a problem. :throwpc: Since all I really need is the 'Type String' for what I'm doing, generating the 'Data String' is a waste of resources. Is there a way to directly get the Type String from a Variant without relying on 'Variant to Flattened String'?

There is a 'Type Descriptor' in the properties of a Control Server Class, but I can't create a reference to my variant's since they're only on wires. I've looked at creating a CIN or DLL to do this but I didn't see much in the documentation about how to use Variants although 'LVVariant' is defined in extcode.h. :headbang:

Thanks in advance for any insights!

Arlan Sprague

Link to comment
I'm using the OpenG variant VIs and they're great! However (there's always a 'however') one of the clusters that I convert to a variant contains a huge amount of data. When 'Variant to Flattened String' started running out of memory I realized that there was a problem. :throwpc: Since all I really need is the 'Type String' for what I'm doing, generating the 'Data String' is a waste of resources. Is there a way to directly get the Type String from a Variant without relying on 'Variant to Flattened String'?

There is a 'Type Descriptor' in the properties of a Control Server Class, but I can't create a reference to my variant's since they're only on wires. I've looked at creating a CIN or DLL to do this but I didn't see much in the documentation about how to use Variants although 'LVVariant' is defined in extcode.h. :headbang:

Thanks in advance for any insights!

Arlan Sprague

The only thing you could try is to use Variant to Flattened String without wiring the flattened string output. LabVIEW may be smart enough to not generate the data if the output is not wired. That is an interesting piece of information, please post the results.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.