GetModuleText

(Engine-Level Function)

Description: Returns information about a module's document file.
Warning: This function should be used only by advanced programmers.
Returns: Varies
Usage: Script or steady state.
Function Groups: Compilation and On-Line Modifications,  Advanced Module
Related to: AdjustCode | GetOneParmText | GetParmText | GetStateText | GetTransitText | GetVariableText | SetModuleText | SetOneParmText | SetParmText | SetStateText | SetTransitText | SetVariableText | TextOffset | TextSize | GetModuleTimeStamp
Format: GetModuleText(Module, Info)
Parameters:  
Module
Required. Any expression for the module.
Info
Required. Any numeric expression giving the information to return, as shown in the following table:

Info

Information to return

0

File name which defines Module

1

Character offset to beginning of Module

2

Length of Module

3

Character offset to beginning of parameter definitions

4

Character offset to beginning of variable definitions

5

Character offset to beginning of state definitions

6

Character offset to beginning of child module definitions

7

Character offset to first variable definition

8

Length of variable definitions

9

Character offset to first parameter definition

10

Length of parameter definitions

Comments:

This function is used when automatically modifying modules.

The file name (Info == 0) will include the full path. and will refer to the version of the module within the .sync folders, not the version in the user-acessible folders.

Example:

  If Watch(1);
  [
    ModuleFilename = GetModuleText(Self(), 0);