lcosta Posted January 9, 2007 Report Share Posted January 9, 2007 Hi, Currently I'm recording and showing to the user a LabVIEW table but I wanted to deliver a user controlled filter, like the Excel Autofilter. The table can hold up to 5000 lines and the lines can have different colour schemes. When filtering the table must be rebuilt in order to comply with each line previous colour scheme. Any ideas? Quote Link to comment
Yair Posted January 9, 2007 Report Share Posted January 9, 2007 I believe that OpenG has what you want - a Remove Duplicates from Array VI and a Filter 1D Array VI. You use the Remove Duplicates VI to generate the list for the ring and the Filter VI to get the indexes of your desired elements and use those indexes to extract the lines you want. I suggest you keep the actual data in another array (both color data and the actual values) and extract the data into your table every time you change the filter. Quote Link to comment
lcosta Posted January 11, 2007 Author Report Share Posted January 11, 2007 Thanks for the input, I've just tried out your suggestion but my problem isn't the filter implementation itself. The main problem here is to apply the colour changes. If a row is removed, the colour scheme of that line must be also removed, as the cell colour is a table property all the rows after the removed one require a update one cell at a time. Example: Row #1: Failed -> RED Row #2: Passed -> GREEN Row #3: Failed -> RED Row #4: Passed -> GREEN Row #5: Failed -> RED By removing the 2nd Row the result should be: Row #1: Failed -> RED Row #2: Failed -> RED Row #3: Passed -> GREEN Row #4: Failed -> RED Conclusion: Removing Row #2 requires an update of the table properties in order to adjust the rows to the colour scheme. In a table with a couple hundred rows the table re-adjustment requires a lot of processing time. I Quote Link to comment
Yair Posted January 11, 2007 Report Share Posted January 11, 2007 Don't keep the color information in the table. Hold it in another array and apply it to the table whenever you change the data in the table. To handle the drawing time, set the Defer Panel Updates property to true before updating the table. This causes the display not to update until you set the property back to false and will make it go MUCH faster. The property itself belongs to the front panel. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.