Jump to content

Get Default Data from Variant


Recommended Posts

There's a VI in the lvdata package called Get Default Data from TD (that accepts a type descriptor input), but there's no equivalent (wrapper) for variant data input. I suggest that a Get Default Data from Variant VI be added to the library, for symmetry (and the fact that it would be useful -- I've needed such a function recently).

Get Default Data from Variant.vi

post-17-0-30793100-1316368166_thumb.png

post-17-0-67113300-1316367980.png

  • Like 1
Link to comment

Hey Jon,

I'm not sure if putting it in the Type Descriptor subpalette is the best place (since this palette is for VIs that take Type Descriptors as inputs). I think that it probably makes sense to put it on the main, top-level palette.

post-17-0-57133400-1316394719.png

Roger.

Unfortunately that spot is already taken ;)

I will have to drop it down a row.

There is also a VVariant palette (which is what the output is)?

Link to comment

Roger.

Unfortunately that spot is already taken ;)

I will have to drop it down a row.

There is also a VVariant palette (which is what the output is)?

Hi Jon,

As long as it's somewhere on the root palette, I'll be a happy camper :lol:

But, I don't think it should go on the VVariant palette, since that is for VIs that deal with variant data (at run time) inside of the variant inputs/outputs (at edit time). It makes sense if you think about it really hard, but is guaranteed to make your head hurt.

For example, in the snippet, below, you end up with a VVariant (a Variant containing a Variant containing a String).

post-17-0-92878100-1316395345.png

Link to comment

Hi Jon,

As long as it's somewhere on the root palette, I'll be a happy camper :lol:

But, I don't think it should go on the VVariant palette, since that is for VIs that deal with variant data (at run time) inside of the variant inputs/outputs (at edit time). It makes sense if you think about it really hard, but is guaranteed to make your head hurt.

For example, in the snippet, below, you end up with a VVariant (a Variant containing a Variant containing a String).

post-17-0-92878100-1316395345.png

Yes, sorry you are correct - it is a VData not VVariant output.

I will add it to the root palette, no dramas.

Cheers!

  • Like 1
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.