Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep 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
Joined
Aug 6, 2013
Messages
2
Location
DE
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

Back
Top