Hi everyone!
I am new to Inventor. I am working on assembly drawings and parts list. I understand that BOM is not the same entity as PartsList. I made parts list with some additional column that do not exist in BOM. I want to reference values from that column in BOM balloon. Is it possible to do this?
Note: For DET column, I made VBA procedure that takes ITEM column value for purchased components and assigns it on DET column value except for manufactured components which get values from manufactured detail number.
Solved! Go to Solution.
Solved by johnsonshiue. Go to Solution.
Think of the parts list as just a last minute override, and the BOM as your main suitable source of data.
If the DET tags are consistent across instances of the part, I would put the information in the model files instead, so they are accessible through the BOM.
If not, the PartsList way you are doing right now works.
To get it to show in the balloon:
- Right click Balloon
- Edit Balloon Style
- Click to edit the property
- At the dropdown up top, change to "Parts List"
- Select the prop you want and ensure it applies to the balloon.
Thank you for reply.
My customer wants their item numbers to be in "0000" format instead of what ITEM column in parts list gives. For manufactured parts is ok because I already have iproperty as DETAIL number in "XXXX" fomat, but for purchased parts I do not have it. That is the reason why I have to add DET column to the parts list and not to BOM.
I tried to do what you suggested but when I select Parts List combobox there is no DET property listed. My common sense tells me it should be there but it is not. Am I doing something wrong? If I try to add New Property and name it DET it does not work either.
Good luck.. Thats an absolutely stupid request from your customer..
I think you will need to make that a custom iproperty in each part if you want that to be in the balloon..
Stupid or not, customer (in this case GM) is always right, or he does not pay you.
I can add DET iproperty for each part, but it will be meaningless for purchased parts because same purchased part can be used for different assemblies within a project. I wonder what I will get when I try to assign PartsList ITEM value to iproperty from BOM, if I have two assemblies that have same purchased part.
@d.veljkovic wrote:
Stupid or not, customer (in this case GM) is always right, or he does not pay you.
I can add DET iproperty for each part, but it will be meaningless for purchased parts because same purchased part can be used for different assemblies within a project. I wonder what I will get when I try to assign PartsList ITEM value to iproperty from BOM, if I have two assemblies that have same purchased part.
Must this "DET" system always start at 0001 and continue up by 1 in sequential order?
Or must it just be a unique 4 digit number and it wouldn't matter if your next parts list had 0003 then 0007 or whatever and not in increments of 1 each time..
If so it wouldn't matter that parts are used somewhere else just make each purchased part have its own unique 4 digit code....
Or why not use ilogic/vb to change the item numbers in a parts list.. Whats the point of both item 1 and det 0001?
Parts List MUST be in sequential order (0001, 0002, etc.) and I had no problem making this happen in Parts List table using VBA. My problem is that I cannot reference balloon value to DET column which is in Parts List table. When I select option for balloon under Property Display in Balloon Style, custom DET is not present under Parts List. Are these values hardcoded?
My understanding, correct me if I am wrong please, is that Parts List is there to set present data on assembly as per custom format (ex. GM format), so you do not use BOM to add all this meaningless data to components. ITEM value changes based on sorting and Parts List is sorted per Supplier and then per Part Number columns. This is why I need DET to change based on ITEM value. When component is removed I need to update my Parts List to reflect the change, so ITEM value changes for some components who were below removed item (component) in Parts List.
Im able to add a new column to a parts list called "DUMB" then enter static data into it (0001, 0002, 0003,etc...) and then edit the balloon style and add a new property called "DUMB" and it pulls the data from the dumb column in the parts list
But that "DUMB" does not show up in the "Parts list" properties when I select that from the dropdown..
This is exactly what I experienced. I do not understand why Parts List property list is hardcoded. There is no reason why it does not add custom column (DET) as an option on the list. Maybe there is a different way on how custom Parts List column should be referenced in order to be seen under Parts List property list?
@d.veljkovic wrote:
This is exactly what I experienced. I do not understand why Parts List property list is hardcoded. There is no reason why it does not add custom column (DET) as an option on the list. Maybe there is a different way on how custom Parts List column should be referenced in order to be seen under Parts List property list?
It could just be a bug or just how it is..
Who cares.. add the new property manually and move on
I'll ask for you though...
@johnsonshiue Johnson.. Should custom columns added to a parts list show up in that list when "Parts List" properties dropdown is selected? They currently don't as show
So can you explain why you can't:
- Sort Parts List based on item number
- Add a macro on trigger before save to OVERWRITE the Item Text with the item number (as pulled from the BOM) to the "####" format?
Do you need to keep an item number associated with the one part number throughout all revisions of the drawing or something funky like that?
@MechMachineMan wrote:
So can you explain why you can't:
- Sort Parts List based on item number
- Add a macro on trigger before save to OVERWRITE the Item Text with the item number (as pulled from the BOM) to the "####" format?
Do you need to keep an item number associated with the one part number throughout all revisions of the drawing or something funky like that?
Thats what I was hinting at before..
Why have DET and item.. Just use a macro to change the item number to a 4 digit format..
Quote: "OVERWRITE the Item Text with the item number". Does this mean that Item TEXT is not same entity (value) as Item Number? This is in regards for Item column in BOM, and not in Parts List. As I said before, my understanding is that Parts List is used for different "styles" for different customers but BOM is always "constant" as per my company's standard. So, any changes I do in Parts List "style" does not reflect BOM values.
I have made new TEST column in BOM and add expression =<Item>, but this returns no value. If I set expression as =<Part Number> I get the value from Part Number column. Should I get value from Item column when expression is =<Item>?
Hi Danilo,
This is a totally legitimate question. I could be wrong but it should be doable. You simply need to add "DTE" property in the Property Chooser dialog. Go to Property Chooser dialog -> select "User Properties" -> click on "New Property" -> type in "DTE" as the new property column -> add it to "Selected Properties" in the right.
It should work. Let me know if you see the same behavior.
Many thanks!
Embed this rule into drawings to run with some trigger.
Sub Main() 'Revise this to match your templates oItemNumberColumn = 1 Dim oDoc As Document oDoc = ThisApplication.ActiveDocument Dim oPartsList As PartsList For Each oSheet In oDoc.Sheets If oSheet.PartsLists.Count > 0 Then For Each oPartsList In oSheet.PartsLists Dim oRow As PartsListRow Dim oDwgBOMRow As DrawingBOMRow Dim oBOMRowItemNumber As String For Each oRow In oPartsList.PartsListRows oDwgBOMRow = oRow.ReferencedRows.Item(1) oRowBOMItemNumber = oDwgBOMRow.BOMRow.ItemNumber Select Case CInt(oRowBOMItemNumber) Case < 10 oRoWBOMItemNUmber = "000" & oRoWBOMItemNUmber Case < 100 oRoWBOMItemNUmber = "00" & oRoWBOMItemNUmber Case < 1000 oRoWBOMItemNUmber = "0" & oRoWBOMItemNUmber Case Else End Select oRow.Item(oItemNumberColumn).Value = oRoWBOMItemNUmber 'oRow.Item(oItemNumberColumn).Value = CStr(oRowBOMItemNumber.ToString("d4")) Next 'Row Next 'PartsList End If Next 'Sheet End Sub
Johnson, thank you for the reply. It is DET instead of DTE but it does not matter. Just to be sure, on one thing. DET is custom column in Parts List table not in BOM table. What happens if I have DET custom column in BOM table AND same name DET column in Parts List table? How can I refer to each of the columns? How Inventor will know the difference which I am refering to in User Property? Will Inventor prevent me to make custom column named DET in Parts list table if there is one with the same name present in BOM table and vice versa?
Now, since you said it should be possible to do the way you described, can you tell me if Parts List property list is hard coded by software or it can be changed by adding new column names? This is just for future reference for anyone reading this.
Thank you!
Hi! Sorry to misspell the property but you get the idea. It is Ok to have DET defined in BOM and also PartsList separately. The one in BOM will be in sync with iam and ipt files. It means that if "DET" does not exist in a given ipt file as a custom iProperty, it will be added to the ipt file.
The one you created separately in PartsList would be considered "dumb" table initially. All entries are "static" in blue, meaning they are not associative to the iam and ipt files. You can uncheck "static" and the values from iam and ipt files will be propagated to the PartsList.
The property list to choose from is limited to predefined properties in Inventor. Yes, they are hard-coded. But, you can always add User Properties like "DET" or anything you want.
Many thanks!
MechMachineMan, thank you for the reply.
As per your macro, I see macro checks if there is any Parts List present and if yes, then it goes through every Parts List on every sheet, then gets item value from BOM table (DrawingBOMRow), adds zeros to match "####" format and then assigns this value to Item value on Parts List (assuming Item is first column). My assumption is that "DrawingBOMRow" is BOM Row object. Am I correct? I still learn object model for Inventor. This is my second week with Inventor. I made macro that does this using values from Item column in Parts List, not using anything from BOM table. I use Supplier column to differentiate from purchased and manufactured components so I can assign different values for purchased parts (just Item value from Parts list) or Detail number from manufactured Part Number. It works perfect but issue with BOM ballon stops me from finishing what I wanted.
Here is the macro:
Public Sub ChangeDETColumValue()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
' Set a reference to the first parts list on the active sheet.
' This assumes that a parts list is on the active sheet.
Dim oPartList As PartsList
Set oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1)
Dim oVendor As PartsListCell
Dim oPartNumber As PartsListCell
Dim oTest As PartsListCell
Dim oItem As PartsListCell
Dim invPartNumber As String
Dim invCharPosition As Integer
' Iterate through the contents of the parts list.
Dim i As Long
For i = 1 To oPartList.PartsListRows.Count
'Get value from PartNumber column
Set oPartNumber = oPartList.PartsListRows.Item(i).Item("NUMBER")
Set oItem = oPartList.PartsListRows.Item(i).Item("ITEM")
Set oTest = oPartList.PartsListRows.Item(i).Item("DET")
Set oVendor = oPartList.PartsListRows.Item(i).Item("SUPPLIER")
'find a specific part number
If oVendor.Value = "JBA" Then
invCharPosition = InStr(1, oPartNumber.Value, "-D")
invPartNumber = Mid(oPartNumber.Value, invCharPosition + 1, 4)
'write to the target cell
oTest.Value = invPartNumber
Else
Select Case CInt(oItem.Value)
Case Is < 10
oTest.Value = "000" & oItem.Value
Case Is < 100
oTest.Value = "00" & oItem.Value
Case Is < 1000
oTest.Value = "0" & oItem.Value
Case Else
oTest.Value = oItem.Value
End Select
End If
Next
End Sub
Johnson,
Please see attached pictures. For some reason, it does not work. I get an empty split balloon as result. What am I doing wrong?
Three additional pictures are attached on next post from me.
Thank you!
Three additional pictures.
Can't find what you're looking for? Ask the community or share your knowledge.