Write to a text file

There is the possibility “rhino.WriteTextFile(Textfile, Array)”

strFile = Rhino.SaveFileName(“Save”, “Text Files (.txt)|.txt||”)
Rhino.Print “N” & N & " Z" & Variable_1 ’ write in the command line
arrStrings(0)= “N” & N & " Z" & Variable_1 ’ It does not work. How do I convert the line properly into a string

Call Rhino.WriteTextFile(strFile, arrStrings)

Hi @Alexander_Schwindt,

In VBScript, you can convert any variable value to a string using the CStr function.

For example:

Sub Main()
	Dim num, str
	num = 3.14
	Rhino.Print TypeName(num)
	str = CStr(num)
	Rhino.Print TypeName(str)
End Sub

– Dale