Sepasoft MES Module Suite
system.instrument.parse.parseText(templateName, text)
Description
Parse string data contained in the "text" property using the template specified by the "templateName" property.
Info
|
The function requires an additional argument on the Gateway script which is the name of the project. |
Syntax
system.instrument.parse.parseText(templateName, text)
- Parameters
String templateName - The name of the parse template to use to parse the text.
String text - The text to parse.
- Returns
ParseResults - Returns a ParseResults object containing the parsed values.
- Scope
All
Code Examples
Python |
#Sample script to read and parse a CSV file then convert the parse results to a dataset and display in a table component: fileStr = system.file.readFileAsString("C:\Temp\Test.csv") parseResults = system.instrument.parse.parseText("CSV Test Column", fileStr) if parseResults.isValid(): dataset = parseResults.createDataset("CSV Results") event.source.parent.getComponent('Table').data = dataset |

Sepasoft MES Module Suite