Page 1 of 1

MODVAR for strings

Posted: Tue Jul 24, 2018 1:05 pm
by Hossein
Dear Tom / Administrator,

I have developed a Venapp that in one part, I need to provide the user the ability of defining the file name that he/she wishes to read from (GET XLS DATA). However, MODVAR function just work for constants not strings! Is there any way that I can the problem could be solved?

Best regards,

Re: MODVAR for strings

Posted: Tue Jul 24, 2018 1:22 pm
by Administrator
Unfortunately there is no way to change strings via MODVAR.

However, you can use
SIMULATE>SPREADALIAS|?alias=filename.xls
or
SIMULATE>SPREADALIAS|?alias=?

Re: MODVAR for strings

Posted: Tue Jul 24, 2018 1:30 pm
by Hossein
Dear Administrator,

Thanks for your reply. I just tried but nothing happened. What excatly these commands do?

Re: MODVAR for strings

Posted: Tue Jul 24, 2018 3:20 pm
by Administrator
http://www.vensim.com/documentation/ind ... ?25372.htm

If you have
shape sales[shape] := GET XLS DATA('?SHAPEDATA','Sheet2','1','B3')

then
SIMULATE>SPREADALIAS|?SHAPEDATA=filename.xls

will substitute "?SHAPEDATA" with "filename.xls"