*robert vetrano
Message 1 of 1 (51 Views)

Read file

51 Views, 0 Replies
08-29-2005 10:11 AM
I know this works outside of Revit can't get to work when called.
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



End If


bob v

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community