If yes, was R5 bugged all that time? It was a good bug… RIP.
This seems to work:
Sub Main Dim strFile, arrStrings(4) arrStrings(0) = "Every" arrStrings(1) = "good" arrStrings(2) = "boy" arrStrings(3) = "deserves" arrStrings(4) = "fudge." strFile = Rhino.SaveFileName("Save", "Text Files (*.txt)|*.txt||") If Not IsNull(strFile) Then Call Rhino.WriteTextFile(strFile, arrStrings) End If End Sub
Make sure you are saving to a folder that you have rights to save into.
This fails in R6. Works in R5.
arrStrings(0) = “Every”
arrStrings(1) = “good”
arrStrings(2) = “boy”
arrStrings(3) = “deserves”
arrStrings(4) = “fudge.”
Rhino.WriteTextFile "test.txt", arrStrings
Not an issue as I just switched all those lines to VB
What folder is this writing to? If you’re not sure, then that’s a problem…
R5 has it written into Rhino.WorkingFolder which is the folder I’m opening my 3dm from which in this case is my desktop.
This function has not changed between V5 and V6.
You should always specify the full path to the file you are writing.
Just saying that I didn’t have to in R5.