How to get the same part number?

How to get the same part number?

Anonymous
Not applicable
697 Views
5 Replies
Message 1 of 6

How to get the same part number?

Anonymous
Not applicable

Dear All,

 

I met a problem, my stituation is:

I need create an assembly model with a sub-assemble model, what I want is use the same item number(same as the sub-assemble model) in the new model. For example, in sub-assemble B, the item number is part A--No.100, but in the new model, part A--No.2. Is it possible to unified the item number?

212121.PNG

 

Thanks in advance for your great help!!!Smiley Happy

0 Likes
Accepted solutions (1)
698 Views
5 Replies
Replies (5)
Message 2 of 6

CCarreiras
Mentor
Mentor
Accepted solution

Hi!

 

No. each main assembly has it own numbering.

You can edit this numbering, but will be a manual process.

CCarreiras

EESignature

Message 3 of 6

Anonymous
Not applicable

Hi Fiona,

 

With this code you can make all the item number to same value. Hope this helps you.

 

Sub Bom_Row()
Dim oDoc As Document
    Set oDoc = ThisApplication.ActiveDocument
Dim oBomView As BOMView
    Set oBomView = oDoc.ComponentDefinition.BOM.BOMViews.Item("Parts Only")
Dim oBomRow As BOMRow
    For Each oBomRow In oBomView.BOMRows
        oBomRow.ItemNumber = "Part A--No 100"
    Next
End Sub
Message 4 of 6

Anonymous
Not applicable

Dear SK.,

 

Thanks very much for your suggestion, but how to use this code? Can you help to point out?

THX.

0 Likes
Message 5 of 6

Anonymous
Not applicable

GoTo Tools Tab --> Vba editor as show in the image

 

2016-08-25_9-24-27.jpg

 

Now a new window will open in that create new module as described in the below image

 

2016-08-25_9-25-30.jpg

 

Now copy and paste the code in that window and run it by pressing f5 key or run button

 

2016-08-25_9-27-05.jpg

Message 6 of 6

Anonymous
Not applicable

Thanks SK,

But somehow all the parts items are 100 now~~~It is ok, I will input manually.Smiley Happy

0 Likes