Saves the task and any local channels it contains to Measurement & Automation Explorer (MAX) under the specified name.

Syntax

Namespace: NationalInstruments.DAQmx

public void SaveTaskAs(Task task, string persistedName)

Remarks

This method sets the Default option for the saved task and uses an empty string for the task Author. You can specify your own options and author value by using the SaveTaskAs(Task, string, string, SaveOptions) overload.

You cannot view programmatically saved tasks in the DAQ Assistant for versions of NI-DAQ earlier than 7.4. To view a programmatically saved task in an earlier version of NI-DAQ, first use the DAQ Assistant in NI-DAQ 7.4 or later to save the task.

Visit the DAQmx Professional Developer Tools Web site for more information and examples of programmatically saving tasks.

Parameters

NameTypeDescription
taskTask

The task instance to save.

persistedNamestring

The name to use for the saved task.

Exceptions

TypeDescription
NationalInstruments.DAQmx.DaqException

The NI-DAQmx driver returned an error.