I’ve been working on a SolidWorks Addin in C# to help with reverse engineering and it’s critical that this runs as fast as possible.
I’m using DotNetBenchmarker to help with this but it’s saying that my Addin is running way slower than it actually is. Using a Stopwatch with Debug.Print I was reading speeds of about 300 ms and DotNetBenchmarker was taking so long that it couldn’t finish.
To confirm this I wrote a simple program that just looped through the features using Feature.GetNextFeature() and it iterated over 226 features in 2 ms while DotnetBenchMarker said it took 5 seconds.
For reference: My addin is already registered in Solidworks using Xcad and I am using a console application benchmarker that links to solidworks using Marshal.GetActiveObject, and contains my addin as a project reference so that I can reuse all my code. I’ve tried putting the benchmarker inside of the addin but that yields the same results.
I’m open to any and all solutions because my next best option is just my own benchmarker that uses the stopwatch.