How-to batch-export custom graphs (using .cmd files)?

Use this forum to post Vensim related questions.
Post Reply
kleemax
Senior Member
Posts: 125
Joined: Tue Jan 26, 2016 3:50 pm
Vensim version: PRO

How-to batch-export custom graphs (using .cmd files)?

Post by kleemax »

I have a vgd-file with A LOT of graphs.
I need to put them into a report, so I need to export them to e.g. as windows meta file vmf.
I know how to do this manually: ctrl panel, display graph and then click the little save symbol on the top left.
However, there is just a small change in the model I'd have to redo the export of every graph manually :( , which is not feasible.
Hence I would like to batch-export these graphs, e.g. using vensim cmd files, if possible.
I would appreciate any feedback even if it is simply "no not possible" because then I'll have to turn to other external softwares do do the graphing.
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: How-to batch-export custom graphs (using .cmd files)?

Post by Administrator »

I don't know of a way of doing this. I'll raise it as a future enhancement though.
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
kleemax
Senior Member
Posts: 125
Joined: Tue Jan 26, 2016 3:50 pm
Vensim version: PRO

Re: How-to batch-export custom graphs (using .cmd files)?

Post by kleemax »

Thanks for the quick reply.
I was hoping that "CUSTOM>GraphName" could somehow be used for that. But I guess that just creates a new graph rather than opening an existing one?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: How-to batch-export custom graphs (using .cmd files)?

Post by tomfid »

I think you could potentially write a Venapp that would run through all the graphs and export them using http://vensim.com/documentation/24990.htm
kleemax
Senior Member
Posts: 125
Joined: Tue Jan 26, 2016 3:50 pm
Vensim version: PRO

Re: How-to batch-export custom graphs (using .cmd files)?

Post by kleemax »

Thanks Tom. The export command that you have linked to, seems to export to the clip-board only. I’m afraid this would overwrite the exported clib-board as the second figure is exported? Is there no way to export to a wmf file that is written into a folder? There may be a way to tweak this to use a system plugin for a multiple clip-board, which could potentially prevent overwriting the first or at least keeping a record of everything that used to be on the clipboard, so that multiple figures could be exported.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: How-to batch-export custom graphs (using .cmd files)?

Post by tomfid »

Hmm... I've never tried this. Will look again.

Another option: create a stack of views with pinned charts (as IO Objects) and use File>Print with All Views selected, directing the output to a PDF print driver.

But I assume what you really want is a stack of PNGs or similar.
kleemax
Senior Member
Posts: 125
Joined: Tue Jan 26, 2016 3:50 pm
Vensim version: PRO

Re: How-to batch-export custom graphs (using .cmd files)?

Post by kleemax »

printing into pdf is what I have been doing. But it has two disadvantages: a) I have to crop pictures afterwards which is time consuming and defeats the purpose of batch-export, and could set the print size the way I want to either. b) unfortunately I'm forced to write the report in MS-Word. Word cannot really handle pdfs appropriately, esp. it cannot link to pdfs. Linking instead if embedding using vector format is only possible with wmf format (MS-word fakes linking for pdfs using invisible wmf files...). Linking is important so that the word-doc will automatically update all figures if I batch-exported a new set of figures from vensim, if that was possible. For reports in latex, pdf would be better, of course. The coolest thing would be if you would integrate an export button in the control panel graphs, so that one could select several graphs and then export them. I'd be fine with cmd scripting, too, though using a vgd file and the desired format. Of course I know this will not come quickly that will not help with my current project, still I think it would be a valuable addition.
Post Reply