Count Part Number in a product
Count Part Number in a product
(OP)
I everyone,
i need a macro to count the part numbers (the diferent ones), that a CATProduct as. My idea is to use this to when add a new component to a Product, automatically the PartNumber as its number.
i need a macro to count the part numbers (the diferent ones), that a CATProduct as. My idea is to use this to when add a new component to a Product, automatically the PartNumber as its number.





RE: Count Part Number in a product
I suggest you to use something like
Set productDocument1 = CATIA.ActiveDocument
Set selPN = productDocument1.Selection
selPN.Search "CATAsmSearch.Part.PartNumber='" & input & "',all"
MsgBox " Number of Selected Elements " & CATIA.ActiveDocument.Selection.Count
Maybe it will help you. I'm not so sure because for me is not so clear what you want at the end. If you want to rename instances in the catproduct you can search the forum for a macro.
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...