LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

place an image on the block diagram

Solved!
Go to solution

Is there an easy way to place an image on the block diagram?

To clarify, I would like a simple way to paste a bmp or jpeg or png or whatever onto my block diagram for the purpose of documenting the block diagram for future programmers.

The way I currently accompish this is by creating a picture constant on the diagram and running a seperate vi to load a picture into a picture window, then using copy and paste functions to get the image into the picture constnat in my block diagram.

There's a simpler way, right?


global variables make robots angry


0 Kudos
Message 1 of 35
(5,117 Views)

Just do something like this:

 

In your function palette, go to:
Graphics and Sound >> Graphic Formats 

Then figure out what format you need to read in (jpg, png, bmp, etc)

and choose the appropriate function.

Then use the 'Draw Flattened Pixmap. vi'.

 

Message Edited by Cory K on 01-10-2009 01:33 PM
Cory K
0 Kudos
Message 2 of 35
(5,110 Views)
Oh, I'm sorry, I misread, you said onto the block diagram.
Cory K
0 Kudos
Message 3 of 35
(5,101 Views)

Thanks, but that isn't at all what I am trying to do. I want to place an image on the block diagram, not read an image. I've attached a screen shot of my block diagram to show you that I am using an image that I pasted onto the block diagram to document the block diagram. The picture below the wiring is a schematic of a rectangular reticle that corresponds to the wiring diagram above. You can see which points go where when drawing the targeting reticle around kermit the frog, so it is easier to understand the wiring diagram.

 

The method I have to use to paste an image into the block diagram is cumbersome. I would like to know if there is an easy way to paste an image into the block diagram.

 

 

Message Edited by Root Canal on 01-10-2009 01:53 PM

global variables make robots angry


0 Kudos
Message 4 of 35
(5,101 Views)

To my knowledge, I dont believe that this is possible (programmatically).

There are only three objects that could hold the picture:

- indicator

- control

- constant

 

And heres the problem with each:

indicator - not visible on block diagram

control - not visible on block diagram

constant - not writable, and has no property nodes to modify it programatically

 

The only way to put an image on the block diagram would be the way you described (or some other technique you would have to do manually).

Cory K
0 Kudos
Message 5 of 35
(5,094 Views)

right.....

 

so, I don't want to do this programatically. I just want to know if there is a less manually intensive way to paste an image into the block diagram than the way I described.


global variables make robots angry


0 Kudos
Message 6 of 35
(5,094 Views)

What version of LabVIEW are you using?
I found a very simple way on 8.5


I just went to some folder where I have a random picture (happens to be JPG).

I right clicked the picture >> copy.

Go to your block diagram >> paste

It will then create a picture indicator.

Right click that control and click >> change to constant.

 

Tah Dah !!!

Message Edited by Cory K on 01-10-2009 02:09 PM
Cory K
Message 7 of 35
(5,091 Views)

I'm in 8.6. right clicking a file and pasting didn't work for me, but I opened the picture in MS Paint, of all things, and copied it into the clipboard, then pasted in labview and bingo- I got a scalable picture decoration right on the block diagram! crazy.

 

thanks, Cory.


global variables make robots angry


0 Kudos
Message 8 of 35
(5,088 Views)
I'm not sure which message to mark as the solution.

global variables make robots angry


0 Kudos
Message 9 of 35
(5,088 Views)

Its your thread, mark whatever you thought answered the original question :smileyvery-happy:

Cory K
0 Kudos
Message 10 of 35
(5,085 Views)