PDA

View Full Version : read-line from txt file


clovis
2008-03-21, 05:56 PM
Hello,
I'd like to update one of my routine, working with layers, by putting them in a TXT file.
The point is that when I get the info using read-line , I also get the tabs
"(\"7A\"\t\t\"AM_7\")" BUT I just want to have ("7A" "AM_7").
Is it (easily) possible without parsing?
Thanks

ccowgill
2008-03-21, 07:02 PM
Hello,
I'd like to update one of my routine, working with layers, by putting them in a TXT file.
The point is that when I get the info using read-line , I also get the tabs
"(\"7A\"\t\t\"AM_7\")" BUT I just want to have ("7A" "AM_7").
Is it (easily) possible without parsing?
Thanks

use (princ layertext writefile)

'gile'
2008-03-21, 07:13 PM
Hi,

(read "(\"7A\"\t\t\"AM_7\")") returns ("7A" "AM_7")

dgorsman
2008-03-22, 08:26 PM
When creating data files, be *very* aware of what characters you are inputing. I would recommend that you always use spaces in ASCII data files, rather than tabs - set up the text editor to input spaces instead of hard-tabs.

clovis
2008-04-07, 03:47 PM
Thank you all