Jump to content

Coerce Variant to Variant


JDave

Recommended Posts

There was a thread a while back that discussed setting control values on a separate VI using the VI Server Invoke Node. I have created generic "Call VI" that can accept initialization values to write to the controls of the called VI, but it naturally gives an error if an INT is sent to a DOUBLE control. Being able to coerce the data being written would be very nice.

The values coming in are variant, but they need to be typecast to a variant that is of the type of the control.

Has anyone ever written a VI to change one type of variant to another? Either the Variant data itself or the type descriptor would be available from "Get Control Value" in order to do the coercion.

Any ideas?

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
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.