Skip to content

MFGS Variables

MFGSVariables Public interface

Description

Describes methods and properties available on the static instance object MFGS.Variables

Diagram

flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph VGWWCoreIEx
VGWWCoreIEx.IExMFGSVariables[[IExMFGSVariables]]
class VGWWCoreIEx.IExMFGSVariables interfaceStyle;
end

Members

Methods

Public methods

ReturnsName
voidClear()
Clears all session variables.
objectGet(string name, object defaultValue)
Gets the value associated with the specified name.
objectGetIndex(string name, int index, object defaultValue)
Gets the value associated with the specified name and index.
boolIsInit(string name)
Gets a value that indicates if a variable name exists
voidSet(string name, object value)
Sets the value associated with the specified name.
voidSetIndex(string name, int index, object value)
Sets the value associated with the specified name and index.

Details

Summary

Describes methods and properties available on the static instance object MFGS.Variables

Methods

Clear

public void Clear()
Summary

Clears all session variables.

IsInit

public bool IsInit(string name)
Arguments
TypeNameDescription
stringnameThe name of the variable.
Summary

Gets a value that indicates if a variable name exists

Returns

true if the variable name exists; otherwise false.

Get

public object Get(string name, object defaultValue)
Arguments
TypeNameDescription
stringnameThe name of the variable.
objectdefaultValueThe value to return if the name cannot be found.
Summary

Gets the value associated with the specified name.

Remarks

If a name starts with an underscore (_), that variable is treated as global and can be accessed by all sesssion. In WinWrap VBA, if defaultValue is not specified, a empty string will be returned if name cannot be found.

Returns

The value of the variable if found; otherwise the default value.

GetIndex

public object GetIndex(string name, int index, object defaultValue)
Arguments
TypeNameDescription
stringnameThe name of the variable.
intindexThe index of the variable.
objectdefaultValueThe value to return if the name and index cannot be found.
Summary

Gets the value associated with the specified name and index.

Remarks

If a name starts with an underscore (_), that variable is treated as global and can be accessed by all sesssion. Indexed variables are stored as name[index], meaning GetIndex(“MYVAR”, 1) is the same as Get(“MYVAR[1]”). In WinWrap VBA, if defaultValue is not specified, an empty string will be returned if name cannot be found.

Returns

The value of the variable if found; otherwise the default value.

Set

public void Set(string name, object value)
Arguments
TypeNameDescription
stringnameThe name of the variable.
objectvalueThe value to set the variable to.
Summary

Sets the value associated with the specified name.

Remarks

If a name starts with an underscore (_), that variable is treated as global and can be accessed by all sesssion.

SetIndex

public void SetIndex(string name, int index, object value)
Arguments
TypeNameDescription
stringnameThe name of the variable.
intindexThe index of the variable.
objectvalueThe value to set the variable to.
Summary

Sets the value associated with the specified name and index.

Remarks

If a name starts with an underscore (_), that variable is treated as global and can be accessed by all sesssion. Indexed variables are stored as name[index], meaning SetIndex(“MYVAR”, 1, value) is the same as Set(“MYVAR[1]”, value).

Generated with ModularDoc