Importing or Exporting Your Scripts

If you already have a script you wrote in the LabVIEW MathScript syntax or another text-based syntax, such as other .m file language syntaxes, you can import it into LabVIEW. You also can save a script from LabVIEW to a text file.

Complete the following steps to import a script into a MathScript Node or another script node in LabVIEW.

  1. Select a MathScript Node or another script node and drag out a region to add the script node to the block diagram.
Note Note  You can create MATLAB script nodes only in the LabVIEW Full and Professional Development Systems. If a VI contains a MATLAB script node, you can run the VI in all LabVIEW packages. You must have a licensed copy of the MATLAB® software version 6.5 or later installed on your computer to use a MATLAB script node.
  1. Right-click the script node and select Import from the shortcut menu to display a file dialog box.
  2. Select the file you want to import and click the OK button. The script text appears in the node.

Complete the following steps to save a script to a text file.

  1. Right-click the script node and select Export from the shortcut menu to display a file dialog box.
  2. Enter the name to use for the text file or select a file to overwrite.
  3. Click the OK button.