.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 1
Anonymous
187 Views, 0 Replies

Read file

Hi
I know this works outside of Revit can't get to work when called.
code
If System.IO.File.Exists("filename.txt") = True Then

'open file and read contents

objWordReader = System.IO.File.OpenText("filename.txt")

Do Until objWordReader.Peek = -1

wordlevel = objWordReader.ReadLine()

If wordlevel.StartsWith("x") = True Then

wordremove = wordlevel.Remove(0, 17)

intword = wordremove.IndexOf(",")

wordremoveII = wordremove.Remove(0, intword + 1)

NewWord = wordremoveII.Substring(0, 5)

TextBox1.Text = NewWord

End If

Loop

objWordReader.Close()

End If



Thanks

bob v
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost