LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D active-x color table does not match color box ctrl values

I am having a problem. I want to allow the user to control the background color and plot colors on the active-x 3D graph in labview 7.1.1. I am using the standard color box ctrls in labview to allow the user to pick, but the colors do not match. When I pick blue (0,0,255), it comes up red (255,0,0). When I choose yellow (255,255,0), it comes up cyan (0,255,255), and vice-versa. Black and white seems to work correctly, as well as green (0,255,0) being right in the middle. I am assuming this means whatever algorithm NI is using to create the color value is not the same from the labview side to the active-x control side. Anybody else run into this, and have a solution?
0 Kudos
Message 1 of 4
(2,482 Views)
OK, well I found my own solution, but Labview is still performing incorrectly. It appears that the red and blue channels are being swapped. If I use the VIs to breakdown the color box ctrl into RGB and then recompile with the red and blue channels trading places, then I get the correct color outputting to the 3D graph.
0 Kudos
Message 2 of 4
(2,478 Views)
The built-in solution that LabVIEW provides is a VI called Convert OLE Color.vi (see the Graphics & Sound >> 3D Graph Properties palette). No doubt it does exactly what you have already built yourself.

So, this isn't a LabVIEW bug, but more of an untidy integration point stemming from the fact that the 3D graph began its life as a standalone ActiveX object instead of a native LabVIEW object.

--John
0 Kudos
Message 3 of 4
(2,473 Views)
Thanks John.

Kind of funny, I ran off and built a sub-vi with the exact same guts as the OLE vi, but from looking at what the RGB vi did to break it down.

I would say though, they need to make a common sub-palette to deal with color issues. They have the same two RGB VIs located in two different spots, and this OLE one is in yet another. I think I would have looked under the Active-X sub-palette before I looked under the 3D graph palette (mainly because those are junk anyway, they barely give you any functionality).

Anyway, problem solved, thanks again.
0 Kudos
Message 4 of 4
(2,470 Views)