09-26-2017 09:06 AM
I have a need to take a variable name, let's say:
Locals.Variable
and then from LabVIEW, retrieve its value regardless of data type (so a variant). I tried to do this with the method
GetValVariant
but occasionally will receive an error:
-17308 Specified value does not have the expected type
I'm wondering why this happens if a variant can handle any arbitrary type and if there is a way around this?
09-28-2017 05:38 PM
Here it is a previous forum that shows a similar issue
https://forums.ni.com/t5/NI-TestStand/Specified-Value-Does-not-have-the-Expected-Type/td-p/389290
This can be useful for you.
09-28-2017 05:57 PM
Similar but not quite the same. In my case, the variable in question is a container with all its elements predefined, none are dynamically added as is the case with the ResultList.
I did however resolve this by using the GetXML method instead which seems to handle any type of variable regardless of structure.