Writes an array of strings to a text file. ANSI, UTF-8 and Unicode encoded text files are supported.
Rhino.WriteTextFile (strFileName, arrStrings [, blnAppend [, intEncoding]])
strFileName |
Required. String. The name of an existing text file to write. |
||||||||
arrStrings |
Required. Array. The array of strings to write to the text file. |
||||||||
blnAppend |
Optional. Boolean. If omitted or False (Default), the file will be overwritten if it already exists. If True, then the will be appended to if it already exists. |
||||||||
intEncoding |
Optional. Number. The text file encoding, where:
|
Boolean |
True if successful, False otherwise. |
Null |
On error. |
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