How many components ran last time some part of my script ran?

Hi,

I’m currently looking at debugging my script, and I want to know exactly what parts is being triggered when I perform an operation. I use metahopper and dynamic pipelines so I am breaking some of the DAG rules.

I have looking at looping through all active object using C# but an IGH_ActiveObject only seem to have a TimeSpan property and not a property for when it was actually run.

Any good ideas?

See example code written by Andrew Heumann, that I’m trying to adapt:

  private void RunScript(ref object Components, ref object Seconds)
  {
    var activeObjects = GrasshopperDocument.ActiveObjects();
    Seconds = activeObjects.Select(o => o.ProcessorTime.Ticks / 10000000.0);
    Components = activeObjects;
  }