Please enable JavaScript to view this site.

Vensim Help

Navigation: Reference Guide > DSS Supplement > Vensim DLL

Displaying and Printing Sketches and Tool Output

Scroll Prev Top Next More

Displaying sketches and tool output requires the full DLL.  See the vendll example in VBASIC40 or VBASIC60.

Sketches

To display a Sketch use the vensim_show_sketch command as in:

Dim winint As Long

winint = Form1.Picture1.hWnd

result = vensim_show_sketch(1, 0, 100, winint)

The recasting of the hWnd as a Long (an Integer in 16 bit) is necessary because of apparent restrictions on argument types in Visual Basic.

If you want the prompts describing variable names to show on a sketch you will need to send Vensim the command SETTING>HOVERCOMMENT|1.  By default the DLL does not display any of this comment information.

Tools

Dim winint As Long

winint = Form1.Picture1.hWnd

result = vensim_tool_command("WORKBENCH>Causes Tree", winint, 0)

The hWnd recasting is the same as for sketches.    To display a WIP tool use:

winint = Form1.Picture1.hWnd

result = vensim_tool_command("CUSTOM>WIP", winint, 1)

Printing and Exporting

Dim winint As Long

winint = Form1.Picture1.hWnd

result = vensim_tool_command("PRINT>", winint, 0)

' or result = vensim_tool_command("EXPORT>", winint, 0)

To the only trick for printing is to get the right window.