Example Code

Simple VB Script to Load a .dat File into DIAdem Data Portal

Code and Documents

Attachment

Overview

The following script prompts the user to select a data file (*.DAT) on their computer and automatically loads the file into the DIAdem Data Portal.

Description

This example was written previously as a KnowledgeBase article, but it is being transferred to a Community Example for document type content consistency. As written, the example only loads .dat files because of the "Call DATALOAD" command. You can modify this script by changing the data load command, adding in initialization, local procedures, a main program, and design notes.

Steps to Implement or Execute Code

  1. Download and open FileRead.VBS in DIAdem
  2. Click the Green Arrow to "Run Script"
  3. When prompted, select the DRIVE.DAT file from the DIAdem public directory to load the file into the data portal (this file should be included with a complete install of DIAdem and supporting files)
  4. Notice the DRIVE.DAT file in the Data Portal

Requirements

Software

DIAdem (most versions); tested successfully in 2014

Hardware

n/a

Additional Images or Video



Kelsey W.
National Instruments
Applications Engineer

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

Contributors