SaveTask(Task, string, SaveOptions)
- Updated2026-02-05
- 1 minute(s) read
Saves the specified task and any local channels it contains to Measurement & Automation Explorer (MAX) under the name it was given when it was created, with specifed author and options values.
Syntax
Namespace: NationalInstruments.DAQmx
public void SaveTask(Task task, string author, SaveOptions options)
Remarks
You may save a task under a different name by calling SaveTaskAs(Task, string).
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
| Name | Type | Description |
|---|---|---|
| task | Task | The task instance to save. |
| author | string | A user-specified string that represents the name to store with the task. For example, tasks created with the DAQ Assistant have the string "DAQ Assistant" as their author. You may pass Empty. |
| options | SaveOptions | One or more flags indicating various save options. |
Exceptions
| Type | Description |
|---|---|
| NationalInstruments.DAQmx.DaqException | The NI-DAQmx driver returned an error. |