Cosmetic Threads

HI,

How can find the number of Cosmetic Threads from a part???  I need a macro to sum up all and add a properties with the result..

If is not possible, then how can I add a search filter in the attached macro?

I want to look in the search for cosmetic thread, to extract the max number from the tail and add  a property with him!.....Those are the steps that I was thinking!

SolidworksApi macros