MODVAR for strings

Use this forum to post Vensim related questions.
Post Reply
Hossein
Member
Posts: 48
Joined: Thu Sep 15, 2016 7:50 am
Vensim version: DSS

MODVAR for strings

Post 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,
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: MODVAR for strings

Post 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=?
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Hossein
Member
Posts: 48
Joined: Thu Sep 15, 2016 7:50 am
Vensim version: DSS

Re: MODVAR for strings

Post by Hossein »

Dear Administrator,

Thanks for your reply. I just tried but nothing happened. What excatly these commands do?
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: MODVAR for strings

Post 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"
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Post Reply