.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
*robert vetrano
Read file
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
35 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
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

