asprague Posted November 19, 2005 Report Share Posted November 19, 2005 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. 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 Quote Link to comment
jpdrolet Posted November 19, 2005 Report Share Posted November 19, 2005 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. 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. Quote Link to comment
Jim Kring Posted November 19, 2005 Report Share Posted November 19, 2005 Is there a way to directly get the Type String from a Variant without relying on 'Variant to Flattened String'? Arlan: How about emptying the data from the cluster before getting the type descriptor. Here is a trick that you can use to get the default data of anything: Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.