Copy DAQ Task to Project
This option creates a new project-based task that is a copy of the selected MAX-based task.
Selecting this menu item opens the Copy DAQ Task to Project dialog box. You must specify a task name, task creation function name, and target directory. When you click OK, LabWindows/CVI completes the following actions:
- Generates source (.c), header (.h), and binary (.mxb) files and adds them to the project.
- Replaces the call to DAQmxLoadTask with a call to the new task creation function.
- Adds an include statement for the generated header file.
The generated source and header files define the task creation function. This function contains the code necessary to create a task that is equivalent to the selected MAX-based task. The generated binary file (.mxb) contains a binary description of the task that is used when you edit the task in the DAQ Assistant.
You might want to copy a MAX-based task to a project-based task to facilitate sharing the task definition among multiple developers or storing the task definition in a source code control system.
The generated files have no link to the original MAX-based task. Any modifications you make to the original MAX-based task will not be reflected in the binary (.mxb) file or the generated code.
This menu item is enabled only when you place the cursor on a call to DAQmxLoadTask.