SaveTaskAs(Task, string, string, SaveOptions)
- Updated2026-02-05
- 1 minute(s) read
Saves the task and any local channels it contains to Measurement & Automation Explorer (MAX) under the specified name and with specified author and options values.
Syntax
Namespace: NationalInstruments.DAQmx
public void SaveTaskAs(Task task, string persistedName, string author, SaveOptions options)
Remarks
If you do not assign a value to the saved task, NI-DAQmx uses the name currently assigned to the task.
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. |
| persistedName | string | The name to use for the saved task. |
| 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. |