DeleteVariable

(Engine-Level Function)

Description: Deletes a variable from a module.
Warning: This function should be used only by advanced programmers.
Returns: Nothing
Usage: Script Only.
Function Groups: Compilation and On-Line Modifications,  Variable
Related to: DeleteModule| DeleteOptional| DeleteState | DeleteStatement
Format: DeleteVariable(Variable[, IgnoreSource])
Parameters:  
Variable   
Required. Any expression that gives the variable value to delete.
IgnoreSource   
An optional Boolean expression. If true, the function will ignore out-of-sync source files and not attempt to make any source file changes. The result is convenient deletion of non-temporary variables without having the function modify the corresponding source code. Defaults to FALSE.
Comments:

Seldom (if ever) used when adding features to modern VTScada applications.

If IgnoreSource is FALSE or not provided then the corresponding text for the deleted variable is removed from the source file. However, this is only true if the variable is not a temporary variable, and only if the files are in sync. DeleteVariable will fail if there are any references to the variable to be deleted.