[Solved] Print total time to solve to text file

Hi Guys,

I know that you can see the total time taken to solve in the bottom left of your active window. I am looking to write this data to a text file. I have the writing to a text file working successfully with other data but I can’t find a method of printing the “solution completed in X seconds)” in a grasshopper component.

Any help would be greatly appreciated.



Hi Kevin,

in C#:

private void RunScript(bool refresh, ref object A)
     A = this.GrasshopperDocument.ObjectSpan.TotalMilliseconds.ToString();

“this.GrasshopperDocument.ObjectSpan” should give you the total running time
of all components in the document.

1 Like

Hi malo_m,

This is working great thanks.

Best regards,