Home › Forums › Problems and solutions in GDL › GDL add-ons › Possible to use data from external text file as parameters? › Reply To: Possible to use data from external text file as parameters?
April 19, 2018 at 13:38
#4011
Participant
Amazing! Thanks very much!
Another problem with it…I need it to follow on from the previous j so instead of the EF_20’s, it’s now EF_25 until EF_30 in the same text document. It currently includes all of the EF_20’s and EF_25’s. It does however stop before EF_30 which is great.
I considered using Vardim on refnote to get the amount but I didn’t know how to correctly implement it.
Thanks in advance!
DIM sarray[]
var = ""
filename = "ProjectNotes.txt"
ch1 = OPEN ("text", filename, "MODE=RO, LIBRARY")
sarray[j]=""
repeat
n = INPUT (ch1, j, 1, var)
pos = STRSTR (var, "EF_30")
if pos # 1 then sarray[j] = var
j = j + 1
until pos = 1 or n = -1
CLOSE ch1
VALUES "refnote2" sarray