Page 1 of 1

(NAME _DICT) How close a loadcase ?

Posted: May 6th, 2017, 3:05 am
by thierryt
Hi all,
Please when i use a program like
While loadcase(NAME_DICT) do
….
….
Enddo ;

If after that i want to do another

While loadcase(NAME_DICT) do
….
Enddo ;
The program load nothing in the second loadcase.
What should i write to reset before starting the second ‘while loadcase(NAME _DICT)’.
Thanks !

Re: (NAME _DICT) How close a loadcase ?

Posted: May 6th, 2017, 8:19 am
by josh
You can use the locate function to restart at the beginning of the file:

locate(NAME_DICT, >=, "");

In CSPro 7 you can use the forcase statement which automatically positions you at the start of the file so you don't need the locate or loadcase.

forcase NAME_DICT do

enddo

Re: (NAME _DICT) How close a loadcase ?

Posted: May 7th, 2017, 11:10 am
by thierryt
Hi josh,
i tried this without success :

While loadcase(NAME_DICT) do
….
….
Enddo ;

locate(NAME_DICT,>=,"");

While loadcase(NAME_DICT) do
….
Enddo ;

Re: (NAME _DICT) How close a loadcase ?

Posted: May 7th, 2017, 11:32 am
by josh
That should work. You could check the return value of locate to see if it is failing but I doubt it would. You can send us your app and we can take a look.