LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Image Navigator to Flip LabVIEW Control/Indicator Component Images.

Like many users of LabVIEW 7.1 3-D controls and indicators,
I wish to generate variant controls such as a left-pointing
Boolean button by modifying the graphic images of the various existing components. The control edit window has no apparent provision for mirror/rotation, only sizing and positioning, so I have been attempting to clipboard the images into the Image Navigator where I can create the desired "flipped" versions, as well as build a palette of standard NI pieces-parts.

Unfortunately, the copy that arrives via clipboard in I-N has been "wrapped" by a couple of pixels and is therefore sufficiently damaged to be unusable.

Any solution, either by avoiding the clipboard corruption or loading these images into I-N from somewhere else in the bowels of LabVIEW's installation hierarchy? I really want to start with the standard images, with their subtleties, rather than re-creating them from scratch.
Message 1 of 11
(6,831 Views)
When you say 3-D controls and indicators, are you referring to any control or indicator that has a 3-D look and feel, or are you specifically referring to the dialog controls?

What graphic image are you trying to mirror to create your left-pointing Boolean button? I was unable to reproduce the pixel wrapping you describe.

Assuming you are referring to the dialog controls, the corresponding graphics for these controls are all pulled from the operating system. LabVIEW does not have a repository of images for each system/theme, but rather imports them from the Windows/Mac/Linux environment. So there's no where else to really copy the images from.

I inquired R&D about how easy it would be for a user to copy what LabVIEW has done and pull in the images themselves. I was told that it is quite difficult and would not be advisable for customers.

These graphics are all vector based (allowing for resizing without becoming bulky or pixellated) so would not work well being copy and pasted anyway.

If you were to create your own modified versions of specific dialog controls, when your application moved to a new system, all the native controls may look different, leaving your modified graphic out of place.

Again, this is assuming you mean the dialog controls. If you are simply trying to modify the regular controls, copy and paste should work, and we need to look into why you are seeing the distortions.

Have a great day!
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 11
(6,807 Views)
Apologies if this is a duplicate reply...my first response disappeared when I hit "submit post"...

To describe what I am doing more explicitly: I am attempting to create a custom control in LV 7.1
(developers suite pce) which looks just like the "Boolean Button" only the arrow points in other
more exciting directions than plain old "right". I am doing this partly out of need and partly as
a vehicle to gain understanding of the control editing utilities.

This control has a part called "Boolean Light" which is the component I wish to edit. It has four
graphic images layered on it for each of the four possible button states. This image is essentially
a subtly shaded and distorted "half moon" (when the overall control is stretched into a circular
shape instead of the flattened oval as it comes on the pallette).

In this particular exercise, I would ideally only need to flip and/or rotate the graphic images and
reposition the part over to the side (top, left, bottom) of the overall control which reflects the
direction the arrow is pointing. However, there is no mirror/rotate utility in the control editor.
(I even tried entering a negative boundary value into the parts window to see if that flipped the
image). So I am forced to find another way to alter or replace the graphics on the "Boolean Light"
part.

Copy to clipboard and paste works to duplicate the graphic within the control editor (the copies
are called "Decoration" in the parts window). These copies retain all of the nice appearance and
behavior of the originals. But dropping the clipboard image into the DSC Image Navigator (which
provides for mirroring, rotating, and coloring) is not so pretty -- the image is wrapped by one
or more pixels in both axes and has apparently been altered in other ways: the transparency of the
perimeter is lost when imported back into the control editor.

I have been able to import a mirrored-rotated version of the "one-half open pie (no line)" in the
"basic shapes" palette of the Image Navigator and get "adequate" results (including the correct
transparency). But 1) this graphic lacks the subtle shading of the original graphic and so looks a
little "flat", and 2) this is one of an extremely tiny selection of unlined graphics that will look
even remotely convincing on a 3D-shaded control.

So what I'm really looking for is a way of mirroring/rotating graphics within the control editor
and/or a more robust palette of usable "bits" with shadings compatible with the style of the
standard LabVIEW 7.1 control/indicators. I would much rather recycle these from elsewhere in the
system rather than have to go off in Corel (or worse $$$) and build them from scratch.

Am I overlooking some back (or side or front) door methods here? I'm sooo close but on the wrong
side of the mirror ;-)...
0 Kudos
Message 3 of 11
(6,792 Views)
I was able to reproduce exactly what you are seeing with the wrapped pixels in the Image Navigator. I'm sorry for this abnormal behavior. The wrapping is a problem with the Image Navigator, not with LabVIEW or the image. I was able to copy the image to Photoshop without any distortion.

The images you modify in the LabVIEW control editor are not actually pictures. They are in picc (picture in c code) format. When you resize, recolor, or move one of these images, the c code actually re-renders the image. This is why you don't see any pixellation when you make them extremely large.

When any of these picc images are copied into another application (Image Navigator, Paint, Photoshop, etc.) a copy of the picc in bitmap form is placed on the clipboard. All of the other information in the picc is lost.

I agree it would be great to have a "rotate" or "mirror" function in the control editor. Because of how picc are developed and stored, however, you cannot do such operations on them. I am sorry for the inconvenience this provides.

Armed with the above information, I'm sure you can see why you are running into the difficulties you've encountered. Please let me know if you have any additional questions.

Have a great day!
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 11
(6,759 Views)
Thanks, Robert.

I have made better progress employing the shapes in the Decorations
palette in the control window and avoiding Image Navigtor entirely.

I have found it possible, but painful, to get these shapes appropriately
tinted for the "boolean light" part by first clipboard-copying the
desired gray image into a part of a scratch-edited control such as the
"Boolean Button" part of the "round LED" (which has a color property
attached), using the color utility to select off and on colors, and
then clipboard-copying these colored images across edit windows into
the appropriate four images of the "Boolean Light" part in my custom
control.

Is there a better way of doing this? I have found no way of invoking
the coloring tool to directly alter the colors of the "Boolean Light"
part of the "Boolean Switch" control; the coloring tool ordinarily
attaches to the shade of the button part, not the light. I read through
the custom control tutorials in vain; they just said "use the coloring
tool", without saying *how*...

Bob
0 Kudos
Message 5 of 11
(6,754 Views)
From the control editor I am able to select the paint tool from the tools menu (turning the autotool off), right-click on the colored light portion of the boolean, bring up the colors palette, and select a new color for that particular part of the light on the boolean button (there are four in all). Is this process not working for you at some step? Which version of LabVIEW are you using?
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 6 of 11
(6,743 Views)
Robert M wrote:
>From the control editor I am able to select the paint tool from the tools menu (turning the autotool off)...

Stop right there !!!! 😉

>Is this process not working for you at >some step? Which version of LabVIEW are you using?

I am using version 7.1 (full), with the RT and DSC modules, bundled as the Developers' Suite P.C. Edition.

Entering the control editor by opening my custom control, my "Tools" menu has no option looking like a selection for the paint tool, beginning with "Measurement and Automation Explorer...", "Instrumentation", and "DSC Module" and ending with "Advanced" and "Options...". Submenus don't lead anywhere promising, either. The toolbar below has icons for "Edit Mode", "Type Def. Status", "Text Settings", "Align"/"Distribute"/"Resize Objects", "Reorder", and "Show Context Help Window".

Sorry, your comment "turning the autotool off" has no meaning to me, and "autotool" does not generate any hits in the NI site search engine.

Is it possible I have not installed some key piece of functionality? I installed no LV software associated with Visual Basic, since I do not have VB installed and the NI installer would not proceed. Otherwise its a fully loaded package.

Thanks!

Bob
0 Kudos
Message 7 of 11
(6,731 Views)
I apologize for my incorrect terminology. When I said "tools menu," I should have said "tools palette." You can access the tools palette by either selecting "Window >> Show Tools Palette" or holding down shift and right-clicking. I'm sorry if I misled you. Let me know if this makes any more sense.
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 8 of 11
(6,718 Views)
Eureka!

The "Window>Show tools palette" path only appears if I click the menu extension arrow, which 99% of the time does not do anything useful.
" RightClick" is a secret salute I missed somewhere in my LabVIEW indoctrination...

Thank you!

Bob
0 Kudos
Message 9 of 11
(6,714 Views)
I'm glad you got it working. You can turn off the menu extension arrow by deselecting "Use abridged menus" from "Tools >> Options >> New and Changed in 7.x".
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 10 of 11
(6,690 Views)