Admin Production ni-theme
Current Publication

CNVDeleteVariable

LabWindows/CVI

CNVDeleteVariable

int CNVDeleteVariable (const char *parentPath, const char *variableName);

Purpose

Deletes the network variable you specify.

Parameters

Input
Name Type Description
parentPath const char * The parent's machine-relative path. You can specify a process name or a process name followed by one or more folder names delimited with the backslash path separator. Do not include a trailing backslash in the path.

Note Note  National Instruments recommends that you use only alphanumeric characters in process, folder, and variable names. If the name contains single quotation mark ('), backslash (\), period (.), newline (\n), or carriage return (\r) characters, you must escape these characters by enclosing the name in single quotation marks. If the contains single quotation mark characters, you also must precede that character with another single quotation mark.

For example, to specify process'Name\folder.Name as a path, enter the following:

  • 'process''Name' as the process name
  • 'folder.Name' as the folder name

Thus, the value you specify for parentPath is 'process''Name\'folder.Name'.

variableName const char * The name of the network variable.

Note Note  National Instruments recommends using only alphanumeric characters in variable names.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. One indicates that a next item was found, zero indicates that a next item was not found, and a negative number indicates that an error occurred.

You can call CNVGetErrorDescription to obtain a string that describes the error.

Additional Information

Library: Network Variable Library

Include file: cvinetv.h

LabWindows/CVI compatibility: LabWindows/CVI 8.5 and later

Examples

Refer to the following examples that use the CNVDeleteVariable function:

  • networkvariable\Configurator\configurator.cws

    Open example
  • networkvariable\NVConfig\nvconfig.cws

    Open example