(("HUC210-2" "10531.28")
("HUC210-2" "10655.57")
("HUC210-3" "10655.58"))
With 3 potential matches.("CS14-R" "10852.1")
("HGUS414" "10531.3")
("HGUS414" "11468.1")
("HUC210-2" "10531.28")
("HUC210-2" "10655.57")
("HUC210-3" "10655.58")
("LSTA12" "10852.4")
("LSTA15" "10852.4")
("LSTA18" "10852.4")
("LSTA21" "10852.4")
("LSTA24" "10852.4")
("LSTA30" "10852.4")
("LSTA36" "10852.4")
("LSTA9" "10852.5")
("WPI49.25" "10667.108")
(setq targets "CS14-R,HGUS414,HUC210*,WPI49.25,LSTA*"))
(wcmatch (car x) targets)
(ReadTabFile-Match "Simpson FL Numbers2012.txt" "CS14-R|HGUS414|HUC210|WPI49\\.25|LSTA")
I've never tested it but thought reading the file without processing would be faster than reading & then processing.
I guess it would depend on the processing taking long enough to delay the next read.
Thanks for your input. 8-)
... I've never tested it but thought reading the file without processing would be faster than reading & then processing....
(setq lst '("CS14-R\t*" "HGUS414\t*" "HUC210*" "LSTA*" "WPI49.25\t*"))
(readata f lst)
("CS14-R" "10852.1")
("HGUS414" "10531.3")
("HGUS414" "11468.1")
("HUC210-2" "10531.28")
("HUC210-2" "10655.57")
("HUC210-3" "10655.58")
("LSTA12" "10852.4")
("LSTA15" "10852.4")
("LSTA18" "10852.4")
("LSTA21" "10852.4")
("LSTA24" "10852.4")
("LSTA30" "10852.4")
("LSTA36" "10852.4")
("LSTA9" "10852.5")
("WPI49.25" "10667.108")
(setq lst '("CS14-R\t*" "HGUS414\t*" "HUC210*" ))(readata f lst)
("CS14-R" "10852.1")
.... (progn (setq fs (vlax-get-or-create-object "Scripting.FileSystemObject")
f (vlax-invoke fs "OpenTextFile" filePath 1 2)
str (vlax-invoke f "ReadAll"))
I didn't know that :)It's nice, but keep in mind it uses more RAM than working line-by-line. It "shouldn't" be a problem though. I think we've found somewhere else that ALisp has a max string size of around 500MB: so unless your text file is larger than this, I don't see a reason to not use this idea.
I didn't know that :)It's nice, but keep in mind it uses more RAM than working line-by-line. It "shouldn't" be a problem though. I think we've found somewhere else that ALisp has a max string size of around 500MB: so unless your text file is larger than this, I don't see a reason to not use this idea.