Example Code

Embedding PowerPoint in VI Front Panel Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This VI allows for the importing of Microsoft PowerPoint Slides for display on the front panel.

 

Description

There are two VIs included in the zipped folder. The 'Slideshow To Jpeg Array.vi' (subVI) utilizes ActiveX nodes to open a user-selected PowerPoint presentation, save each slide as a JPEG in a temporary folder in the application directory, and then close the PowerPoint application. The VI then imports the newly created JPEGs and stores them in an array to be output by the VI. Finally, the temporary folder as well as JPEG files are deleted from the disk.

The 'Front Panel PPT 2012 NIVerified.vi' (mainVI) serves as an example for how to display the slides-turned-image-array on the front panel of a VI. The VI incorporates settings for both slide duration and relative size on the front panel.

 

Steps to Implement or Execute Code

  1. Download the attached File.
  2. Open Front Panel PPT.vi
  3. Run Front Panel PPT 2012 NIVerified.vi
  4. Select PowerPoint to be displayed on front panel

  

Requirements

  • LabVIEW 2012(or compatible)

 

Additional Information or References

Main VI Block Diagram

2-290-3.png

Sub VI Block Diagram

 2-290-1.png

 

**This document has been updated to meet the current required format for the NI Code Exchange. **

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
cathy345
Member
Member
on

The 'Slideshow To Jpeg Array.vi' (subVI) utilizes ActiveX nodes to open a user-selected PowerPoint presentation, save each slide as a JPEG image in a temporary folder in the application directory, and then close the PowerPoint application. So you use the jpeg as an intermedia? I just wonder the greatest benefit of this idea is ?

BVeezy
Member
Member
on

This serves as a sort of work around. Using ActiveX allows you to open the PowerPoint application and manipulate a presentation in the traditional manner. The application which inspired this example was a situation where the end user wanted to loop through a set of slides embedded in the front panel while displaying live data via traditional indicators. The JPEG intermedia allows for 'slides' designed in PowerPoint to be embedded using simple image VI's, requiring less ActiveX manipulation.