Macro Language Reference > Macros > Tag > tsavetxt
  
tsavetxt
Description
Saves an PTC ALD text stream tag as an ASCII file, either with or without PTC ALD formatting codes.
 
Example 271. Save a text stream without its PTC ALD attributes
The example below saves the text stream tx1, without its PTC ALD attributes, to a file called volume1.txt in the specified directory:
tsavetxt "tx1","d:/text/volume1.txt",0
Syntax
tsavetxt ( tag:t? file:s? mode:n? options:s? )
tsavetxt
[no parameter]
The name of the current text tag will be shown in the Save Text Tag (ASCII) dialog box. Here you can type in the name of the file to which you want to save the text stream and enter the save mode.
tag
The name of the tag to be saved.
file
The name of the file under which you want to save the tag.
If a specific encoding is to be used this must be specified on the front of this path or file in the form {:encoding}, e.g. {:utf-8}{myfiles}demo.3d
Encoding options are described below:
XML Encoding
Initiates auto XML from the Import types, uses information from file header or BOM if it is an XML file
3B2 Standard
PTC ALD modified ASCII
UTF-8
standard
UTF-16
standard
ISO-8859-1
standard
mode
0
Strip out all PTC ALD markup — <body>, &ref;, etc.
1
Leave PTC ALD markup in stream.
options
Specify an output character map to use when exporting text. Maps may be either internal streams or external maps located in the smaps.3ad file.
Toggle character map inversion on or off. All of the character maps described below convert from a particular character set to the ISO character set used by PTC ALD . With tsavetxt use a (hyphen) first to invert this, to convert from the ISO character set to another character set. For example, specifying –a will save from ISO to the ANSI character set.
a
Use ANSI character set.
i
Use IBM character set.
o
Use IBM Danish character set.
g
Use IBM Greek character set.
b
Use SmartFont (TextData) character set.
c
Use Mac character set.
s
Use ISO character set (default).
[...]
Use a specific character map name, specified between square brackets [ ], e.g. specifying [_m_a_p_ibm] is equivalent to specifying i.