Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. Private Sub GetLabwareInfo()
  2. Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(AssaySummaryFilepath)
  3. MyReader.TextFieldType = FileIO.FieldType.Delimited
  4. MyReader.SetDelimiters(";")
  5. Dim ReturnText As String = ""
  6. Dim currentRow As String()
  7. Dim Counter As Integer = 0
  8. Dim StrExpression
  9. While Not MyReader.EndOfData
  10. Try
  11. currentRow = MyReader.ReadFields()
  12. If currentRow(0) = "Labware" And currentRow(1) = VBArgWorkorderNo Then
  13. 'format Labware;4;LW96UGRE;LW96UGRE[001];1
  14. StrExpression = "integerarray[" & Counter & "][" & "0" & "][" & "0" & "] := " & currentRow(2)
  15. Host.ResolveExpression(StrExpression)
  16. StrExpression = "integerarray[" & Counter & "][" & "0" & "][" & "0" & "] := " & currentRow(3)
  17. Host.ResolveExpression(StrExpression)
  18. StrExpression = "integerarray[" & Counter & "][" & "0" & "][" & "0" & "] := " & currentRow(4)
  19. Host.ResolveExpression(StrExpression)
  20. End If
  21. Counter += 1
  22. Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
  23. MsgBox("Line " & ex.Message & "is not valid and will be skipped.")
  24. End Try
  25. End While
  26. 'remove trailing semicolumn
  27. ReturnText = ReturnText.Substring(0, ReturnText.Length - 1)
  28. 'return labware information to fluentcontrol
  29. End Using
  30. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement