Hi. We have a core template model which gets replicated for multiple regions and when we transfer it to each region we update the mdl text file for things like vdfx/cin paths, excel input files etc. Just wondering if there was a way to set a view by default within the mdl file (i.e. we always want it to open on view XXX) and also to set the control panel time axis parameters (e.g the model starts from 1971 and it needs to run from then, but when graphing we might want to only show from 2010 onwards by default). I know we could save it like this before a copy over but as multiple users run this process, it would be better to do this programmatically to avoid users forgetting this step.
Thanks,
Dave
Default initial parameters when copying a mdl
-
- Super Administrator
- Posts: 4667
- Joined: Wed Mar 05, 2003 3:10 am
Re: Default initial parameters when copying a mdl
Yes. If you edit the MDL file in a text editor, near the bottom, you will see something like
19:100,2
"19" means "zoom level" and "initial sketch". In this example, the zoom is 100%, the initial sketch is number 2 in the list.
For time axis, you need to modify settings 24, 25 and 26. The following sets min time = 29, max time = 49 and special time = 39.
24:29
25:49
26:39
19:100,2
"19" means "zoom level" and "initial sketch". In this example, the zoom is 100%, the initial sketch is number 2 in the list.
For time axis, you need to modify settings 24, 25 and 26. The following sets min time = 29, max time = 49 and special time = 39.
24:29
25:49
26:39
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Default initial parameters when copying a mdl
That's great. Many thanks!
Re: Default initial parameters when copying a mdl
Did some initial testing on a simple new model with a couple of variables and this seemed to work except for the zoom functionality. If I adjust the zoom in sketch mode I could see the number reflected in the '19:' parameter. However, if I was to then adjust the zoom value in an external text editor and then reload, it seemed to use the previous value and not respect the new zoom value set.
The other issue is that the model that I want to use this on, does not have any of these parameters to adjust within the mdl file. If I add them externally they are ignored and removed on any subsequent save in Vensim. However, I did find these existed in a separate mdls file which gets created presumably on first open of the mdl file. In the mdls file, I could change these parameters successfully except for zoom and they were reflected in the sketch. So I'm thinking that at the same time I replicate the mdl file I should also replicate a matching template mdls with the desired default parameters.
For reference, is a full listing available of what the numeric codes are before the colon (e.g. 6: -> default subscript selected; 9: -> runname)?
FYI, I'm using Vensim DSS 10.1.3.
Thanks again,
Dave
The other issue is that the model that I want to use this on, does not have any of these parameters to adjust within the mdl file. If I add them externally they are ignored and removed on any subsequent save in Vensim. However, I did find these existed in a separate mdls file which gets created presumably on first open of the mdl file. In the mdls file, I could change these parameters successfully except for zoom and they were reflected in the sketch. So I'm thinking that at the same time I replicate the mdl file I should also replicate a matching template mdls with the desired default parameters.
For reference, is a full listing available of what the numeric codes are before the colon (e.g. 6: -> default subscript selected; 9: -> runname)?
FYI, I'm using Vensim DSS 10.1.3.
Thanks again,
Dave