Example Code

Classes in Script Using Diadem

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

  • Diadem

Code and Documents

Attachment

Overview

This DIAdem Script is an introduction to using classes in DIAdem.

 

Description

This example is a short introduction to using classes within DIAdem script.  There is an example clock layout for the report (Clock.tdr), and a short script, which defines a class, MyClock, with a subroutine that adds seconds to the clock as well as properties for seconds, minutes and hours.  The clock is initialized at noon and adds a new second to the time every second.

 

Requirements

Diadem 11 (or compatible)

 

Steps to Implement or Execute Code

  1. Copy Classes Script 2011 NIVerified.vbs and Clock.tdr in the same folder
  2. From the SCRIPT tab in DIAdem, open Classes Classes Script 2011 NIVerified.vbs
  3. Run the script

Additional Information or References

7812 script.JPG7812.JPG

 

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

Cheers,
Kelly R.
Applications Engineer
National Instruments

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