Often times, I have a set of code in a for loop that takes a while to complete, so I put in a progress bar on the UI. The problem is the progress bar defaults to 0-100 range, and my for loop normally does not have 100 iterations.
So.... I can either rescale the progress bar to the number of elements, or I can use the "N" and "i" to calculate the percent complete and use that.
Since I like to keep my progress bars as 0-100 (since that works nicely to also show a percent complete) and % complete is useful elsewhere, I generally always end up calculating % complete of my for loops.
Well, why can't NI calculate this for me automatically??? Something like expanding the "i" iteration counter in the loop also have a "%" box right next to it.
Example shown below should probably wire as a double instead of an int, but you get the idea!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.