@zph wrote:
....
Selecting 1 through 5, the error occurs.
Selecting: 1, 2, 3, 4, 5, no error.
Selecting: 2 - 5, 3 - 5, 4 - 5, no error.
Selecting: 1 - 2, 1 - 3, 1 - 4, no error.
....
EDIT3: You mention quantity limits. What quantity limits?
In addition to the possibilities already discussed that a limit on selection sets or variables could be the problem, could there be a limit on how long a list of things it can handle?
Instead of putting every eventual line in the resulting file into a list:
(setq cDlist (cons (list (strcat
rNo ", "
cCl ", "
RK1 ", "
EL1 ", "
HN1 ", "
PORT1 ", "
cTc ", "
cNo ", "
RK2 ", "
EL2 ", "
HN2 ", "
PORT2 ", "
MISC1 ", "
MISC2 ", "
DESC
)) cDlist)) ;setq
and then writing each of them out to the file at the end, opening and closing the tFile for every one individually:
(foreach cD cDlist
(progn
(setq tFile (open tFpath "a"))
(write-line (car cD) tFile)
(close tFile)
) ;progn
) ;foreach
try skipping the list altogether, opening tFile for appending once at the beginning and not closing it until after all this, and writing each line to the file as it's generated, rather than putting it into a list:
(write-line (strcat ; in place of (setq cDlist (cons (list
rNo ", "
cCl ", "
RK1 ", "
EL1 ", "
HN1 ", "
PORT1 ", "
cTc ", "
cNo ", "
RK2 ", "
EL2 ", "
HN2 ", "
PORT2 ", "
MISC1 ", "
MISC2 ", "
DESC
) tfile) ;write-line ; in place of ) cDlist)
If I've mis-read something about how it works, and you really do need that list format, you might also try simplifying it by not making a list of lists with each sub-list containing one item [a text string], but simply a list of "top level" text strings, directly:
(setq cDlist (cons (strcat ; without the (list) wrapper
....
) cDlist)) ;setq -- single right parenthesis at beginning, closing only (strcat) function
and then at the end, write each text string directly, rather than needing to pull each text string out of its little sub-list:
(foreach cD cDlist
(progn
(setq tFile (open tFpath "a"))
(write-line cD tFile); without the (car) wrapper
(close tFile)
) ;progn
) ;foreach
but if viable, I would still suggest opening tFile once at the beginning and closing it once after all these things have been written to it.
Kent Cooper, AIA