From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling selected images into a single document

Hello,

I would like to create a VI that will pull images from a folder and put them into one Word document to be printed off.  It would work like this:

 

There would be a series of buttons on the front panel to choose from, each of which corresponds to a single image in a folder.  The images can be in whatever format will be easiest to work with.  So, let's say you click the second, sixth, and tenth button.  Labview would then search a folder for the selected images, and insert them into a document so they could be printed off, three or so images to a page. 

 

I have never really used LV to interface with other programs or manipulate images, so I'm not sure where to start.  Any advice would be much appreciated, thanks!

 

Chandra

0 Kudos
Message 1 of 2
(2,254 Views)

Hello Chandra,

 

There are a few ways to go about this. The first part consists of selecting an image based on the button pushed on the front panel. You could do this using a case structure within a while loop, or by using an event structure within a while loop. You would need the appropriate image file path to be chosen when the button is pushed.

 

I have attached an image to describe a way of implementing this using an event structure. When the 'A' button is hit, the code within the case structure will run. 

 

If you have the Report Generation Toolkit, it is very easy to add an image to a word document as all you would need to do is use the Append Image to Report VI that comes with it. Otherwise, you would be looking at using ActiveX calls to accomplish this.

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
0 Kudos
Message 2 of 2
(2,216 Views)