Jump to content

Put a Decoration on a Controls Palette


Recommended Posts

Posted

I need to create a custom "Decorations" palette. You can't drop a control file with only decorations on it, though. And you can't put a "merge VI" on a controls palette. Any ideas how this might be accomplished?

Posted

Well that is interesting.  I've never had a need to make a decoration to be used in other places and be available on the palette, but I'm surprised there doesn't exist some way of doing this.  

 

I guess the easiest way to do this is to make a control that is transparent, other than the decoration then save it.  So make a boolean transparent, then do something like replace the decal image (or false or true) with your decoration.  The obvious side effect is the fact that you will have a whole bunch of booleans on your block diagram that don't go any where because they are just for looks.  You could do similar stuff with the 2D picture control but I'm guessing it won't scale the way you like when stretched.

Posted

Simon Hogg at NI figured it out: Put the decoration on a .vi and add that file to the control palette. You'll have to change the file browse dialog's filter from (.ctl, .xctl) to "all files" so you can select the .vi. It gets added to the palette and drops its decoration onto a new front panel just fine. We could think of it as a "merge VI" for front panel contents!

Posted

Neato.  What's a little interesting is the fact that the "Place VI Contents" is not an option on the control palette editor, but it just knows to merge it I guess.

Posted

What you're seeing is just the behavior of control VIs, and, since control VIs are VIs, it doesn't matter if you use a regular VI. Since it isn't a typedef, LabVIEW just says, "Well, that means copy the contents over."

Posted

Makes sense when you say it that way, but there's nothing in the product that has led anyone (here) to believe it's possible. Looks like a golden opportunity for expanding documentation or making it more obvious that any VI's front panel can be added to a controls palette.

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.