;

// Run the simulation
foreach (int status in tran.Run(ckt, Simulation.AfterSetup | Simulation.Exports))
{
    switch (status)
    {
        case Simulation.AfterSetup:
            var eb = tran.EntityBehaviors[&quot;R2&quot;];
            eb.TryGetValue(out tb);
            eb.TryGetParameterSet(out bp);
            break;

        default:
            double time = tran.Time;
            double output = outputExport.Value;
            break;
    }
}
</code></pre>
<p>Combining all these code snippets fin