Automation tool to insert the item No

Automation tool to insert the item No

lkirit2000
Advisor Advisor
319 Views
3 Replies
Message 1 of 4

Automation tool to insert the item No

lkirit2000
Advisor
Advisor

Hi 

 I need to connect item no in the part list to each part automatically. For example 20 items in the part list. Normally, it is in the 1st sheet. But details member drawings in the rest of the pages, and under this item, no will link with the component to the part list. I need to link it automatically.

 

I need an automation tool to insert the item no.

How to do that?

 

Please see the images.

 

Thanks

Kiri

0 Likes
Accepted solutions (1)
320 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Hi @lkirit2000.  I don't think there is a way to truly 'Link' the text showing in that 'view label' with the 'Item Number' value of a specific row in a 'Parts List' somewhere else in that drawing.  It may be possible to write enough code to figure out what that value should be, then make sure the value in that view label is correct, but it would likely have to be a 'static' value...meaning if you were to change the Item number for that line in the Parts List, it would not automatically update that value in that view label.  Important factors in this sort of thing are how the view was configured.  Such as, is that view directly referencing one specific part file, or is it directly referencing the main assembly, where the 'representation' is set in some way to limit the view's contents to just that one component occurrence?  If it references the main assembly directly, then it may be pretty complicated to figure out which component occurrence is showing in that view.  If it is referencing the part file directly, then there is no direct link to which Item Number it may be within a parent assembly.  So, would have to capture some aspect of the view's referenced document, then iterate each row of the parts list, checking which assembly occurrences the row references, then dig deeper to the actual document the occurrences reference, and try to cross reference the two.  If a match is found, then capture the parts list row's item number value, and go back to the view, get the view label, and dig into its text to include the value, and format the result the way you want it. Pretty complex process.

 

Pretty much only the Balloon annotation objects are designed specifically for that purpose, and can keep that 'Link' or connection live.  This is partially because of an actual reference (BalloonValueSet.ReferencedRow) to the DrawingBOMRow, which the PartsListRow also references (PartsListRow.ReferencedRows) for the information it shows.  In some other types of situations involving other types of data, there is sometimes 'FormattedText (containing XML Tags)' somehow involved, but I have never seen any formatted text related stuff related to 'linking' to a specific row of the Parts List, or specifically its Item Number before.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 4

lkirit2000
Advisor
Advisor

Hi Wesley,

 

Thanks for your advice.

 

Please guide me where to learn the  i-Logic?

 

Thanks

 

Kiri

0 Likes
Message 4 of 4

WCrihfield
Mentor
Mentor

Hi @lkirit2000.  That is a good question, and a relatively common one.  But I don't think there is a single, simple answer to it that would be satisfactory for everyone.  There are several ways to learn about how to automate Inventor, and several different resources available that can help, but likely the most effective way to learn about all of it is through personal experience with trial & error experimentation / testing.  Using iLogic, which is not a coding language, but rather an Inventor add-in which adds certain elements into Inventor's user interface, and offers its own set of tools to help with automation related tasks, is just one possible way to approach it.  I will attach a PDF to this reply which contains a brief explanation of a few main points, then also has some helpful links that you can look into.  Some of the links just point you to specific areas of the 2024 online help about Inventor's main API, plus some about iLogic.  There are also some links to a few other learning helpers, but I can't possibly list all of them in one place.  Some of the others who respond in this forum regularly also have their own personal blog sites, which contain articles about how to do certain things within Inventor by code.  Spending a lot of time browsing within this forum, searching for previous questions / problems / challenges, reading others replies and example codes for those tasks, can also help a lot, as part of a long term learning plan.  I have learned a lot over the years from reviewing what other folks have posted, and interacting with some of them along the way, and it has certainly helped me make advancements within my own automation solutions, as a result.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes