Stop adding rows based on what the text contains
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-04-13 11:08 AM
2018-04-13
11:08 AM
(I apologise for the amount of posts but this is very frustrating!!)
All I need is the ability to stop counting the lines based on what one of the rows contains.
Is there a function that will do what I want it to?
The row that I don't want to include starts with "EF_25" which is what I should be able to use to identify it but I just don't know the line/s of script that will help me achieve it.
DIM sarray[] var = "" ! file in the library, containing parameter data filename = "ProjectNotes.txt" ch1 = OPEN ("text", filename, "MODE=RO, LIBRARY") i = 1 j = 1 y=1 sarray[x1] = "" for z = 1 to x1 n = INPUT (ch1, y, 1, var) sarrayThank you.= var j = j + 1 i = i + 1 y=y+1 next z CLOSE ch1 ! parameter popup with strings read from the file VALUES "RefNote" sarray x1 = vardim1(sarray)
ArchiCAD 23
Windows 10
Windows 10
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-04-14 11:41 AM
2018-04-14
11:41 AM
Haven't you try the DATA Addon? The first entry in each line you can use as searchfield and then read the rest of only this line.
In the GDL cookbook it is explained well. (https://www.nottingham.ac.uk/~lazwww/cookbook/)
In the GDL cookbook it is explained well. (https://www.nottingham.ac.uk/~lazwww/cookbook/)
Jochen Suehlo . AC12-28 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
GDL object creation: b-prisma.de
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2018-04-16 05:36 PM
2018-04-16
05:36 PM
Hi.
You could use STRSTR for each line and [GOTO "label"] outside the counting loop once the string is found.
Best regards.
You could use STRSTR for each line and [GOTO "label"] outside the counting loop once the string is found.
Best regards.