Page 1 of 1

'Find' command

Posted: Wed Nov 06, 2019 3:42 pm
by Phill
I feel I am missing a simple trick here! I needed to change all the 'GET XLS' commands in a rather large Vensim model, so that the files Vensim fetches are 'xlsx', rather than 'xls'. So, I used the 'Edit' - 'Find' command the look for the relevant variables in Text view. But I can't find a 'Next' option for the 'Find' dialogue. The search locates the first line containing 'GET XLS', but I can't see a way to move on, although i'm sure there must be one. Can anyone point it out to me, please?

Incidentally, I tried copying the entire text into Notepad++, making the replacements there and copying it back, but when i tried to save the edited file I got a 'Vensim Stop - syntax error' warning. I presume Notepad++ adds something or alters the formatting, but I would have thought it should work.

Phill

Re: 'Find' command

Posted: Wed Nov 06, 2019 3:48 pm
by Administrator
You can use the F3 button to find the next occurance.

Notepad++ should have been ok, if you can paste in here what Vensim was complaining about I can take a look.

Re: 'Find' command

Posted: Wed Nov 06, 2019 4:02 pm
by tomfid
Notepad++ definitely should have worked - I use it all the time.

Another option is to do this in the text editor (View>As Text) and use the Replace or Replace String command.

Re: 'Find' command

Posted: Wed Nov 06, 2019 4:06 pm
by tomfid
Also, rather than:

GET XLS( 'mydata.xlsx', ... )

you can use

GET XLS( '?my data', ... )

when Vensim encounters the ? it will query for the data file location, and store it for future use. Thereafter, you can manage the data pointer via Model>Settings>XLS Files.

Re: 'Find' command

Posted: Wed Nov 06, 2019 4:10 pm
by Phill
Thanks, F3 is exactly what I was looking for!!