SaveAsTextFile

Saves the document data in the text file with the specified file name.

Syntax

SaveAsTextFile(doc, filePath)

Parameters

Parameter

Type

Description

doc

documentReference

Reference to the document

filePath

string

Text file path.

Return

None.

Note

This function uses options that were specified the last time the menu command File | Export Data | As Text File was executed.

Examples

Python

import nex
doc = nex.GetActiveDocument()
nex.SaveAsTextFile(doc, "C:\\Data\\dataFromNex.txt")

NexScript

doc = GetActiveDocument()
SaveAsTextFile(doc, "C:\Data\dataFromNex.txt")