2014-01-23 01:33 AM
2014-01-26 02:42 PM
2014-01-27 05:09 PM
2014-01-29 11:00 AM
2014-01-29 10:20 PM
2014-08-07 02:11 AM
2014-08-08 01:33 AM
! Example to read all string values from a file ! and use it in a value list DIM sarray[] ! file in the library, containing parameter data filename = "ProjectNotes.txt" ch1 = OPEN ("text", filename, "MODE=RO, LIBRARY") i = 1 j = 1 sarray[1] = "" ! collect all strings DO n = INPUT (ch1, i, 1, var) IF n > 0 AND VARTYPE (var) = 2 THEN sarrayI used this to learn and script a "text notes" object that reads any tab-separated text file to show different tabulated data, regardless of row/column count.= var j = j + 1 ENDIF i = i + 1 WHILE n > 0 CLOSE ch1 ! parameter popup with strings
2017-11-27 06:11 AM
2017-11-27 01:39 PM
Tom wrote:
Coming back to this post.
Hoping someone can help me.
I cannot work out how to read a text file into a pulldown window in an object.
Is that possible? The pulldown window may have a different number of fields depending on the text file, not sure if this is an issue setting the size of the array. I assume arrays are static sizes.
Any help would be appreciated
Thanks
Tom
2017-11-27 10:27 PM