omron — GetLine

Appendix: Built-in Scripting Language (e.g., C:\File.txt ) or a simple file name (e.g., File.txt ). In the latter case, the project will search for the file in the following paths: • Local Station : The project will search for the file in the project folder and Web sub-folder. • Thin Client : If the parameter optRunFromServer is set to 0, the path where the file will be searched is undetermined. If is set to 1, it will search for the file in the URL typed in the Browser, and if the file is not found, in the Backup URL. Note: For Web-enabled projects, we recommend setting the optRunFromServer parameter to 1 and placing your files in the project's Web sub-folder.

Search There are two options for this parameter, based on the data type of the value you give it: • If it is a string value or tag, then the function will search the text file for the first occurance of the string and then copy the entire line that contains the occurance to the tag specified by tagStore . Additional occurances are counted (see Returned Values below) but not copied. • If it is a numeric value or tag, then the function will go to that line number in the text file and then copy the line to the tag specified by tagStore . The first line of the file is line 0. tagStore Name of the String tag receiving the contents of the line pointed to by the function.

This name must be enclosed in quotes; if it isn't, then the function will use the contents of the tag rather than its name. optNumCase Optional numeric tag specifying whether the search is case-sensitive. • 0: Not case-sensitive • 1: Case-sensitive optOverflowTag Optional numeric tag receiving the result of overflow verification. • 0: OK • 1: Overflow optRunFromServer Optional numeric tag ignored when the function is called on local stations. On Thin Clients, this parameter indicates the following: • 0: Retrieves the file from the Thin Client machine (do not use this value with non-fully qualified names) • 1: Retrieves the file from the Web Server.

If the file name is not a URL, then the function will ignore the project path and search for the file in the URL where the screen files are located. Returned value If the function is successfully executed, then it returns the total number lines in which the search string was found. Otherwise, the function returns one of the following errors: Page 530 InduSoft Web Studio 0 String was not found in the target file -1 File not found -2 Invalid strFileName parameter -3 Invalid strSeqChar parameter -4 Invalid strStoreTag parameter -5 Invalid optNumCase parameter -6 Invalid optNumOverflowTag parameter