Accessing the total time of Current Simulation

Is there another property that return the total of time (like minutes and seconds) that the simulation takes to be complete?
I’ve tried accessing via getSimulation().Elapsed or simTime, but it doesn’t work. I’ll would like the end of the simulation time without running a timer while running the simulation.

(by the way I’ve been listening to your videos which are wonderfully instructive but the intro sound just destroys my ears every time, for further video you might want to turn it down a little X)

Thanks, best regards!

Simulations are generally infinite unless you specifically set some run time from the UI. It is also generally not possible to know beforehand how long a simulation will take as the end condition would depend heavily on your specific simulation.

If you mean how long simulation was run before it was paused or reset, you would need to register for the corresponding event and then store the vcSimulation.Elapsed value at that time.

Ok, so the simulation isn’t process in background before simulating it in Visual Components so you cant get the value of the end of the timer right? Like there’s a timer variable running at runtime that gives us the time where the Time is currently in the simulation. In that case I’ll have to make the simulation run for each piece and see the time at the end.

Thanks for your time.Elapsed ! :stuck_out_tongue:

Yes, simulations are not precalculated / canned somehow. This allows you to interact and edit the simulation model while it is running / paused, and so can external systems through the Connectivity feature, custom scripting etc.

1 Like