The Vensim DLL can send WM_USER messages to the parent application on Windows.
To use this feature, create a window in your application that you can monitor. Get the handle to this window and call
hVensimCallBackWindow = <handle to window that will receive callbacks>
nResult = vensim_tool_command(_T("SPECIAL>CALLBACKWINDOW"), hVensimCallBackWindow, FALSE);
Now when a user clicks on a parameter within a Vensim window (for example, a causes tree), a WM_USER message will be sent to hVensimCallBackWindow. When this message arrives, other DLL commands can be called to retrieve the new workbench variable.