Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read text file line by line using Solidworks API?

Status
Not open for further replies.

jinfui

Mechanical
Aug 6, 2013
2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim lines() As String = IO.File.ReadAllLines("C:\Users\hong\AppData\Local\Temporary Projects\WindowsApplication1\bin\Debug\1.txt")
Dim lineArray As New ArrayList()
Dim o, p, q, r, s As String


For x As Integer = 0 To lines.GetUpperBound(0)
lineArray.Add(lines(x))
Next


o = lineArray.Item(0)
p = lineArray.Item(1)
q = lineArray.Item(2)
r = lineArray.Item(3)
s = lineArray.Item(4)


MsgBox(o)
MsgBox(p)
MsgBox(q)
MsgBox(r)
MsgBox(s)


End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor