01-05-2013 05:05 PM
I must be missing something very stupid here. Why is this cast not working? Thanks!
01-05-2013 05:42 PM
01-05-2013 05:43 PM
01-05-2013 05:44 PM
I do not know why it happens, but why would you want to to cast to a generic refnum and then back to the cursor refnum?
I suspect that you lose some information when going to the generic refnum. That lost information then does not allow the cast to the more specific cursor reference.
Lynn
01-05-2013 05:53 PM
01-05-2013 05:58 PM
Obviously, this VI is not the VI that stimulated this question. I have a much more elaborte setup where I pass generic references to a thread and then cast them back to their original types. I'm simply demonstrating the behavior and wish to understand it. As demonstrated (and as you would expect), I cast the graph reference to and from a generic reference with no error, but I can't do this with the cursor reference. Maybe I'm missing something obvious but I don't understand why this cast isn't allowed. Is there a place in Labview help that describes which references can be cast between more generic types and back down?
01-05-2013 06:03 PM
01-05-2013 06:06 PM
It's the only error. I can actually get the class id of the cursor before it is generic, then after it's generic. But when I try to make it more specific, it fails to do so. As you can see in the following (and in the original), the cursor exists and should be readable.
01-05-2013 06:57 PM
What I am about to suggest is a workaround to be considered a last resort. Try Type Casting the reference instead.
01-06-2013 08:28 AM