| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Related |
| Back to top |
| Back to top |
texwrit(file, texseg, tfile)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | str | Input file name | 1 - | |
| TEXSEG * | List[int] | Input text segment | 1 - 1 | |
| TFILE * | str | Output text file name | 1 - |
| Back to top |
FILE
Specifies the name of the PCIDSK image file that contains the text segment.
TEXSEG
Specifies the number of the text segment (type 140) to transfer to a text file.
TFILE
Specifies the name of the text file to receive the text segment data.
The specified output file must not already exist before running TEXWRIT.
| Back to top |
TEXWRIT transfers text information from an existing text segment (TEXSEG) in an image file (FILE) to a new text file (TFILE).
TEXWRIT allows you to edit information (for example, attribute data) contained in the text segment by transferring the data to a text file. You can then use TEXREAD to replace the edited text data in the original text segment.
| Back to top |
Edit attribute data contained in text segment 19 of the demo file, irvine.pix. To do this, create a text file from the text segment.
from pci.texwrit import texwrit file = "irvine.pix" texseg = [19] tfile = "attrib.txt" texwrit( file, texseg, tfile )
After editing the text file attrib.txt, use TEXREAD to create a new text segment in the image file. The text file is checked for the attribute format.
from pci.texread import texread
file = "irvine.pix"
texseg = []
texform = "att"
dbsn = "edited"
dbsd = "edited attribute data from segment 19"
tfile = "attrib.txt"
lasc = []
texread( file, texseg, texform, dbsn, dbsd, tfile,lasc )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.