Getting a list of sketches and releasing handles

Use this forum to post Vensim related questions.
Post Reply
bobbypowers
Junior Member
Posts: 3
Joined: Fri Jul 13, 2007 6:29 pm

Getting a list of sketches and releasing handles

Post by bobbypowers »

Hello, I am working on creating an interface that links to a model using the DLL, and had a few questions.

First, is there a way to get a list of the Sketch names, so I myself can make a pull-down menu like in the bottom of Vensim that has all of the sketches in a model that the user can select and use? I would think it was something using the vensim_get_info() function call, but couldn't find any documentation on it.

Second, is there a way to get vensim to release control of a window element? Let me explain this better. I have a 500x500 control in a window I've made. I am doing some OpenGL stuff in it (displaying graphs of variables, for example). I want to be able to show the user the structure of the model using that same control, so I call vensim_show_sketch(1, 0, 5, openGL.Handle) (where openGL.Handle is the pointer to the handle of the control). This works great, shows the sketch and all, but I want to be able to clear the sketch and go back to OpenGL stuff I had displayed earlier, but I can't get the sketch to disappear. I think this is something on Vensims part, is there a way to tell vensim to release that control, to stop drawing there?

yours
Bobby
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Vensim_get_info with a value of 22 returns a list of views.

The Vensim sketch is cleared when the window is closed - probably the easiest thing to do is to create a new window that is the same size as the window you are working in - create the sketch in that window, then destroy the window to revert back to the other window.
Post Reply