How to call VisSim module from .Net
Answers
-
Submitted by Anders89 on Fri, 07/29/2011 - 00:02.
You can use system calls like CreateProcess and System.Diagnostics.Process to invoke the \vissim80\vissim32.exe executable. VisSim accepts command line arguments including .vsm file paths to load and run VisSim diagrams from the command line. This is described in the VisSim help file and User Guide under Customizing VisSim > Customizing VisSim Start Up.
Customizing VisSim start-up
By adding arguments to the VisSim start-up command, you can control such things as how VisSim starts up, the block diagram file opened at start-up, and whether VisSim immediately runs the opened diagram.
From a desktop icon
- Right click the mouse over the VisSim 8 icon.
- Click on the Shortcuts tab and enter one or more of the following arguments in the Target box. If you enter more than one argument, separate them with spaces. If a block diagram name is included in the argument list, it must be specified last.
From an application
use CreateProcess from C/C++ or System.Diagnostics.Process constructor + System.Diagnostics.Process.Start for .net
Command line arguments
Use this argument To block-diagram-path Open the specified block diagram path. -i Start VisSim as an icon. -nb Suppress the VisSim start-up banner. -ne Suppress the run completion dialog box. -r Run the diagram but stay in VisSim on run termination. -re Run the diagram and exit upon completion. Example
c:>vissim32 -i -re -nb \programData\VisSim\mydiagram.vsm
0