Getting a list of sketches and releasing handles
Posted: Sat Aug 18, 2007 5:31 pm
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
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