I am currently developing a handfull of user components for the company I am working at. They are near finished but now other people get to use them I am getting feedback that it’s kind of annoying to not know if the calculation is proceeding and how fast it is.
Any ideas on how to display a frequently updated text while the component is still working?
Yeah, waiting in the dark is the worst… just like when waiting for make2D (hint hint McNeel)
What I usually do is calculate how many calculations are to be made, then convert that to % and use rs.Prompt() to show it on the commandline. There is also a progressbar command you can use, but I rarely use it. If there are many thousand fast calculations then you don’t want to update the prompt for each pass as it is slow, so then you need to add a counter and update for every 10 or 100 or so.
Here is a simplified version, start there and ask when you need it more advanced:
import rhinoscriptsyntax as rs
for i in range(nrCalculations):
rs.Prompt("Calculation "+str(i)+" of "+str(nrCalculations))
Wow A step in the right direction!!
One wish though: Move the progressbar up to a visible area, the right half og Command bar, or even the Command bar background would be nice.
Also it hurries to 98% and then stands idle at 98% until it’s done. But it’s much faster now.
And if I minimize Rhino and maximize then the progressbar is gone.
And I would like to have the visible lines drawn in front of the hidden by default. (Rhino should pay attention to layer order…)