Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Part Number in a product 1

Status
Not open for further replies.

TiagoFigueiredo

Industrial
May 22, 2013
494
PT
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.
 
Replies continue below

Recommended for you

Hi,

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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top