algorithmic modeling for Rhino
I am working on a custom component that writes strings to a text file, line by line, in order to run simulations in a thid-party analysis program. When the text files are opened in the analysis program, they contain phantom characters that cause the file to be unreadable. Can anyone help with this issue?
Thanks!
Tags:
I have attached a screenshot of the problem. A colleague was attempting to use the text file in the analysis software but saw these strange characters in the file. The program I am creating the file for requires specific formatting, so I am trying to write the file line by line. To write the file, I have used code like the following:
Dim LineCount As Integer
Dim TextLine(200) As String
TextLine(0) = ("{").Trim()
TextLine(1) = ("""" + "Project" + """" + ":" + " {").Trim()
TextLine(2) = ("""" + "FileName" + """" + ":" + " """ + Filename.ToString + ".hcnc" + """" + ",").Trim()
And so on for about 100 lines.
I have found a VB.net example (http://whatilearnttuday.blogspot.com/2011/10/write-text-files-witho...) and tried the fix they suggest, but the analysis program still will not read it. Is there something different about the way GH components create text files that could be causing this?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by