DAQmxSaveTask

NI-DAQmx C Functions

DAQmxSaveTask

int32 DAQmxSaveTask (TaskHandle taskHandle, const char saveAs[], const char author[], uInt32 options);

Purpose

Saves the specified task and any local channels it contains to MAX. This function does not save global channels. Use DAQmxSaveGlobalChan to save global channels.

Programmatically saved tasks cannot be viewed 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 website for more information and examples of programmatically saving global channels.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task to save.
saveAs const char [] Name to save the task as. If you pass an empty string ("") or NULL, the name currently assigned to the task will be used.
author const char [] Name to store with the task.
options uInt32 Use this parameter to set certain options. You can combine options with the bitwise-OR operator ('|') to set multiple options. Pass a value of zero if no options need to be set.
Value Description
DAQmx_Val_Save_Overwrite Overwrite a task of the same name if one is already saved in MAX. If you do not set this flag and a task of the same name is already saved in MAX, the function returns an error.
DAQmx_Val_Save_AllowInteractiveEditing Allow the task to be edited in the DAQ Assistant. If you set this flag, the DAQ Assistant must support all task settings.
DAQmx_Val_Save_AllowInteractiveDeletion Allow the task to be deleted through MAX.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.