NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Active Participant
murchak
Posts: 218
0 Kudos
Accepted Solution

How to create color constant or an array of colors?

How does one create an array of colors? Is this similar to creating an array of strings or an array of numbers?

How would one create a color constant? For example, for my XY Graph, I went to create -> property node -> BG Color,

and changed this to write. But now I need to wire a "color constant" to this property. I don't know how to do that.

Trusted Enthusiast
P@Anand
Posts: 2,385
0 Kudos

Re: How to create color constant or an array of colors?

Yes creating a color constant is similar to the String and numeric array Just pull a color constant and place it inside an array. Just take a color constant and wire it what is the problem?

-----

The best solution is the one you find it by yourself
Member
sebster
Posts: 101

Re: How to create color constant or an array of colors?

On your front panel, drop an array control.

 

From the numeric pallette, drop a framed colour box control.

 

Drag the colour box into the array.

 

On the block diagram, right click the array and change to constant.

Trusted Enthusiast
TiTou
Posts: 2,993

Re: How to create color constant or an array of colors?


murchak wrote:

How does one create an array of colors? Is this similar to creating an array of strings or an array of numbers?

 


Yes.

 


murchak wrote:

How would one create a color constant?


The color box constant has been moved around into different palettes over the years so only real expert know how to find it :smileyvery-happy:

But you could also use "QuickDrop" to find it :smileywink:

 

In LV 2010 here's where to find the color box contant :

color box.png

And in the control palette, you find the color box in the "numeric" subpalette.

 

In terms of data type, the is no "color" data type, it's a U32, that's why when you create a constant or control or indicator from the node BG color you get a numeric, there might be an idea to change that in the LabVIEW Idea Exchange, I'm not sure...

 

Hope this help

_______________________________________________________________________
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Member
sebster
Posts: 101
0 Kudos

Re: How to create color constant or an array of colors?

So that's where it is on the block diagrams!! I could never find it. Whereas I knew it was a numeric on the front panel.

 

That's even easier then.

Trusted Enthusiast
P@Anand
Posts: 2,385

Re: How to create color constant or an array of colors?


sebster wrote:

So that's where it is on the block diagrams!! I could never find it. Whereas I knew it was a numeric on the front panel.

 

That's even easier then.


Ha.. One more tip you can search for the color constant in the search option instead of posting in the Forum :smileyvery-happy:

-----

The best solution is the one you find it by yourself
Trusted Enthusiast
TiTou
Posts: 2,993

Re: How to create color constant or an array of colors?


P Anand wrote:

Ha.. One more tip you can search for the color constant in the search option instead of posting in the Forum :smileyvery-happy:


Yes but he wouldn't get all the useful tips if he did a search :smileywink:

_______________________________________________________________________
When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"
Trusted Enthusiast
P@Anand
Posts: 2,385
0 Kudos

Re: How to create color constant or an array of colors?

Ya I know he can't search for a solution there but atleast he can get the color constant. :smileywink:

-----

The best solution is the one you find it by yourself
Active Participant
murchak
Posts: 218
0 Kudos

Re: How to create color constant or an array of colors?

[ Edited ]

Thank you to all that replied and helped me with this.

 

Anand,

 

Thanks for the tip. I will try to remember to search for things in the LabVIEW help documents first. The fact that I didn't, highlights the difference between a novice and an expert. 

I used to tutor students in physics and I always wondered why they didn't try this or that, then one day I realized that they were simply not familiar enough with the subject matter

to independently think of all the little things that I would think about first when tackling a physics problem. They simply were not experienced enough to reach for a standard bag

of tricks, and always sought help from a TA first. Experience is a great thing indeed.

Trusted Enthusiast
P@Anand
Posts: 2,385
0 Kudos

Re: How to create color constant or an array of colors?

Yes True. Also LV help has improved a lot more in 2011 version. Just tried to make life easy. Good luck

-----

The best solution is the one you find it by yourself