Using the createSim function

The createSim function returns a handle to the simulation. With the handle, you can invoke vsmCgRuntime to run the simulation. Every time you call createSim, you get a unique handle to a new simulation object. This means that you can have multiple simulation objects embedded in your custom application.

variable = sim-name createSim();

The sim-name is the function name you provided when you generated the code.

The declaration for the createSim function is:

SIM_STATE *variable