10-29-2010 11:24 AM
I am working on a script for report generation that will create pareto charts based on the search result.
Right now I am doing the exact same search and display, except the part number (one of 8 conditions) changes each time. So I have 8 copies of the same code, just the part number constraint is defined differently.
I am guessing that I could do this in a For loop and make the code much cleaner (and expandable for new part #s), but I cannot figure out how to make the For loop adjust the part # each iteration.
Normally you would count up or down until you reach a set value, but I am not sure how you change the for loop condition when the part #s are not sequential (or any pattern at all)
Thanks.
10-30-2010 02:40 PM
Hi Kenny,
I have done this many times and have code I'd be happy to share. If you optimize the part number property, then you can query the DataFinder to give you an array of all the distinct part numbers, which you can then loop through.
I think it would be easiest to contact me via email at brad.turpin@ni.com,
Brad Turpin
DIAdem Product Support Engineer
National Instuments