CleanModule

(Engine-Level Function)

Description: Removes the flag that marks when a module that has been changed programmatically and would therefore have its changes saved to disk were this flag not cleared.
Returns: Nothing
Usage: Script Only.
Function Groups: Advanced Module
Related to:  
Format: CleanModule(Module)
Parameters:  
Module
Required. Any expression giving a module to clean.
Comments: When a module's code is changed through VTScada script (for example, by using a function such as AddVariable) a flag is set in the engine to indicate that the associated script file must be updated before shutdown. This function clears that flag, preventing the update.
This function can be used to make transitory code changes (such as, by the Expression Manager) or to reverse code changes that have been undone (page editing).

This function requires a module handle as its sole parameter such as the return value of a LoadModule function.

Example:

    X = LoadModule(…);
    { … module is modified by code … }
    CleanModule(X);