When I start the simulation in code firstly, it is ok. But it happens that all modules in the whole layout are disrupted when I start simulation secondly. Are there something I do not notice?
The code I used:
public void TestFun()
{
ISimulation simulation = _application.Simulation;
simulation.TimeMode = SimulationTimeMode.VirtualTime;
simulation.Reset();
simulation.RunTime = 100;
simulation.SpeedFactor = 4;
simulation.WarmupTime = 0;
simulation.Run(100);
}