Is there any way to attach the part number from the parts list to a drawing view? I've attached a very simple example.
Many parts I have need separate detail drawings. The part obviously has an item number in the parts list which can change if items are added/sorted etc.
In the view label, I'd like to have the item number so that they can change with the parts list and stay attched to the drawing view.
Any ideas on how to do this? Thanks for any help.
Solved! Go to Solution.
Solved by lkrenzler. Go to Solution.
I'm sure you cannot do this,
What I would suggest it so link it by Part Number. On the View identifier select the Pencil and find that propertie and add it to your text field.
I can see why Item number would not be in the list as it is not a properties of the Item its self. Especially if you have multiple parts on a different assembly layers this can become confusing to read.
I've been doing it as a leader text symbol.
http://blog.ads-sol.com/2014/10/part-info-on-dxf-exports.html
Thank you very much for the help. I was hoping there would be something more I was overlooking.
Using part numbers is not really practical for us as our numbers get pretty long. The welder looking at the drawing just wants to know "which one is item 4" sort of thing. He's not going to want to read a 10 digit number in a list of hundreds. That would be pretty tedious.
If I could get "item number" as a variable, then the leader text would work but that's doesn't seem to be an option.
We have been using the system of dragging balloons down from an assembly off the page (shown below). This works but is such an absurd workaround I get crap from the rest of my team every day such as "can't we find a better solution than this!" type of comments. Another problem is that if you move the view, the balloon does not follow (even if you select it) so that's pretty annoying. It's the only way I know of so far though.
I can't imagine a more basic thing as to label parts according to their item number, kind of like being able to make balloons. I guess that's one more thing to post in the idea station 😞
Don't know if you know iLogic, but this seems like a perfect candidate for it. I personally know how to tweak routines, but not write them from scratch. Just something to look into and consider.
If this solved your issue please mark this posting "Accept as Solution".
Or if you like something that was said and it was helpful, Kudos are appreciated. Thanks!!!!
I don't currently but I might have no choice. I'm not much of a programmer but I'll give it a go...
Out of curiosity.. Do you ever reuse parts from project to project or actually stock any components besides just the raw material?
I'd get sick of having to do a drawing for a reused part over and over again for each project..
Personally the fact that you think a welder or other employee would have a problem just using part numbers is whats created this problem in the first place..
If you simply would use the part numbers that don't change like item numbers could then your problem is solved.. Now you are just making this a bigger problem than it really needs to be. IMO
There is a reason the functionality you are looking for is not part of Inventor.. Its just not "common practice"
Only a very small percentage are ever re-used in our projects, so we're not doing drawings for re-used parts.
I don't think the welders and fabricators would have a problem. I KNOW they would. If I sent out drawings with long part numbers they'd send it right back and tell me to shove it. We have 10's of thousands of parts so the numbers are necessarily long I'm afraid.
It seems like such an extremely simple thing to want to label parts according to their item number (just how much simpler can it get?). Just mind blowing that every other variable is there except for one that seems most needed.
As for not being "common practice", I don't buy that at all. It's certainly common practice in our industry (oil and gas) and that's a fairly large industry. It may not be common practice in all industries but it certainly is here.
This might be a great little tool for some third party/individual to develop and market. I guarantee there's a demand for it, I hear from a lot of people on this one. I'd be the first customer 🙂
I'll try on my own but not sure of success there.
@mcgyvr wrote:
There is a reason the functionality you are looking for is not part of Inventor.. Its just not "common practice"
Hi mcgyvr,
Actually, it is standard practice in the structural steel fabrication industries. But Inventor currently does not support those industries very well. In addition to this item/view label issue, there is also the issue of parts lists that can't give the feet and inches in separate columns ( [12'] [4 3/8"] becoems [12'- 4 3/8"] ), and parts lists that can't provide leading zeros for fractional inches ( [12' - 0 3/8"] becomes [12' - 3/8"] ) , as well as the limitations for cope offsets and standard practice copes for bolted flange connections.
I don't currently deal with these industries, but from past experience I can confirm that these are real limitations in using Inventor for those types of industries.
Hi lkrenzler,
I think the solution you're looking for will come in 2 parts. The first is getting the item numbers in the part files as a retrievable property:
The second part is problematically writing that information to the view label:
I almost think that I've seen someone on these forums that has already come up with the code to do what you're after, but I don't recall for certain, so you might search this forum and the Inventor Customization forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Thank you for all the info Chris, I'll be researching it in depth.
Looks like a third part should completely re-write the whole BOM/Parts List sytem as it is truly terrible as it is, at least for our industry.
I'll start with the numbers though...
lkrenzler wrote:
Looks like a third part should completely re-write the whole BOM/Parts List sytem as it is truly terrible as it is, at least for our industry.
Hi lkrenzler,
I would say that the BOM/Parts List system is actually quite well done for standard mechanical design, which is what Inventor has been and continues to be developed for. You are probably aware that you are using a program that wasn't developed for your specific industry, and therefore you should be prepared to make adjustments and use work arounds as needed in order to use it.
Note too that Autodesk might have another package out there that would fit your needs better, or could be used in combination with what you have currently:
http://www.autodesk.com/products/autocad-structural-detailing/features/all/gallery-view
http://www.autodesk.com/products/advance-steel/features/all/gallery-view
http://www.autodesk.com/suites/building-design-suite/included-software
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Thanks for the info. Inventor wasn't my choice but I'll point out the options to those that make the decisions.
Do you have Part Number in the parts list ? I am assuming you don't because of the length, it's not visible from the first image? Also assuming you don't have "part number row merge" active in BOM.
Curtis is right: One way is to create a custom iproperty to hold that value and then to call it in the view label. This might work fine as long as you don't reuse the part.
You can also do it with ilogic and here's a short description of how the code bellow works. It compares the model referenced in the view with the model referenced by each row entry in the parts list. When match is found it gets the parts list item number, turns the view label on and adds this text with a little formatting (underline and size) in the drawing view.
Curtis has a post on how to get formating of text here.
The code asks you to select a views to process because you don't want to process all views (assembly views especially). We could find a value like Part Number in the table (to compare against) but there was no Part Number column and it could have been a problem if you had "Enable Part Row Merge" in the BOM. I decided to use filename with complete path because there might have been multiple parts with same filename but windows doesn't allow files with same name in the same place.
Since I am not a programmer it took couple of hours to get it running but it's been tryied and tested, and woked fine in AIP 2015.
See how that goes for you.
' Set a reference to the drawing document. ' This assumes a drawing document is active. Dim oDrawDoc As DrawingDocument oDrawDoc = ThisApplication.ActiveDocument 'view selection code Dim oSSet As SelectSet = ThisDoc.Document.SelectSet If oSSet.count = 0 Then MessageBox.Show("You must select a drawing view first", "iLogic") Exit Sub End If 'start processsing all selections Dim i As Long For i = 1 To oSSet.Count 'Reference to the drawing view from the current selected object Dim oView As DrawingView = trycast(oSSet.item(i), DrawingView) If oView IsNot Nothing Then 'Get the full filename Of the view model Dim oModelFileName As String oModelFileName = oView.ReferencedDocumentDescriptor.ReferencedDocument.FullFileName ' 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 oPartList = oDrawDoc.ActiveSheet.PartsLists.Item(1) ' Iterate through the contents of the parts list. Dim j As Long For j = 1 To oPartList.PartsListRows.Count ' Get the current row. Dim oRow As PartsListRow oRow = oPartList.PartsListRows.Item(j) 'get filename of model in row Dim oRowFileName As String oRowFileName = oRow.ReferencedFiles.Item(1).FullFileName 'compare the filenames 'Performs a text comparison, based on a case-insensitive text sort order 'If strings equal returns 0 If StrComp(oModelFileName, oRowFileName, CompareMethod.Text)=0 Then 'Get the value of Item from the Parts List 'Row name needs to be case sensitive or use 1 for first 2 for second etc. oCell = oPartList.PartsListRows.Item(j).Item("Item") 'Row name needs to be case sensitive or use 1 for first 2 for second etc. 'get the value of text in cell Dim oItemValue As String oItemValue = oCell.Value 'Show the view label oView.ShowLabel = True 'format the text first line oStringItem = "<StyleOverride Underline='True' FontSize='0.35'> ITEM " & oItemValue & " </StyleOverride>" 'format the text second line oStringScale = "<Br/><StyleOverride FontSize='0.3'>(Scale <DrawingViewScale/>)</StyleOverride>" 'add to the view label oView.Label.FormattedText = oStringItem & oStringScale End If Next Else MessageBox.Show("The selected object is not a drawing view", "iLogic") End If Next
Thanks a million Adrian! I will definately give it a try.
To answer your questions Adrian, yes to both. I do have the part number active and merge part number rows (because there may be several of one item, we just want the quantity, not the same part listed many times). One drawing can have hundreds of items so this will be great if we can get it to work. Thanks! Here's a better image of how our parts list is displayed:
I wanted the same thing and found a workaround that works well for me
Thanks Mario, great to have options.
I'm going to try to get the script working because it's exactly what I need.
Right now, I get an error saying I need to select a view first but I did select a view already.
I'm trying to work through that right now. I'm totally inexperienced in this area so it might take some time.
Thanks!
I had that as well. Just select it again and run the code.