Thanks for your fast response. I’m working on a naval architecture plugin where I have to make 37 copies of a base hull and rotate them by increment of 5 degree to calculate the portion of the hull that will be underwater at different heeling degrees( from 0 to 180 degree = 37 cases ) I already wrote the plugin without using multithreading and it works perfectly well but its a little slow. So for example ,instead on running one big loop like for(int hullIdx=0;hullIdx<38;hullIdx++) {RunStudy[hullIdx, doc ]}. I thought that i can split it into smaller loop and run it on different threads. This is what I’m trying to do .
Hello Dale, I found a solution. The threading code should not reside in the “protected override Result RunCommand(RhinoDoc doc, RunMode mode)” of the XCommand class but should happen in a method residing in another class outside the plugin