GetCodeObj

(VTScada Layer module. Obtain LayerRoot using the following script-only statement: )

    LayerRoot = \System.GetLoadedAppInstance(GetGUID(0, \LocalGUID));
Description: Retrieves the "Code" object associated with the layer.
Returns: Object
Usage: Script Only.
Function Groups: Configuration Management
Related to: GetLoadedAppInstance |
Format: LayerRoot.GetCodeObj()
Parameters: none
Comments: This function is useful when there is a need to work with the code object of a layer other than the current application.

Examples:

  ...
    Layer      = \GetLoadedAppInstance(\LocalGUID) ;
     { \LocalGUID is a defined constant holding the GUID of the current application }
    AppCodeObj = Layer\GetCodeObj();
    PageParmNames = ListVars(Scope(AppCodeObj, SessionData), "*", 0, 0, 4 {parms}, 0, 0, 0, 0);
...