.NET

Reply
*robert vetrano
Message 1 of 1 (55 Views)

Read file

55 Views, 0 Replies
08-29-2005 10:11 AM
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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.