Adding a Custom Class Module in Inventor API

Adding a Custom Class Module in Inventor API

tdant
Collaborator Collaborator
1,177 Views
2 Replies
Message 1 of 3

Adding a Custom Class Module in Inventor API

tdant
Collaborator
Collaborator

Hey all,

 

Almost every drawing I produce has an assembly and its component parts detailed on the same sheet, along with an assembly-level parts-only Parts List that I use to assign labels to the component views. Many times, I have multiple assemblies and parts lists on the same sheet. I wrote a macro that allows me to click the source parts list, then click the individual views I want to label, and the macro reads the parts list and assigns the appropriate values to the views automatically. However, any subsequent changes to the parts list require me to run the macro again to update the part views.

 

Problem: I'd like to add functionality to my macro that will remember what component views belong to which parts lists and update the views any time the parts list changes. I can use nested collections to accomplish that task at the macro-level, but the collections won't be attached to the Drawing document, so the changes won't follow the file.

 

It seems like I need to add a custom class to Inventor that will allow me to attach my collections so they follow the drawing. Something like DrawingDocument.ViewLinks, where each ViewLink is an collection consisting of a PartsList object in index 1 as the source, and multiple DrawingView objects.

 

TL;DR Is it possible to add custom class modules to Inventor?

0 Likes
1,178 Views
2 Replies
Replies (2)
Message 2 of 3

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Do I understand Correctly?

 

  1. You have one Master-partslist on the drawing of the master assembly.
  2. you have different subassemblies in your drawing and also the partslist.
  3. you like to balloon according the item numbers in the Master-partslist, for all views.

my suggestion is then:

 

  • why do you not  give the subassemblie partslist he same item numbers as the Master-partslist?

 

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

tdant
Collaborator
Collaborator

My issue isn't with balloons, but view labels. I want the view label to reflect the parts list values like this:

 

Position <ITEM NUMBER> (this coincides with the assembly balloons)

<PART NUMBER>

<ITEM QTY> REQ'D

 

My macro edits the text of the view label to match the parts list. When the parts list changes, the view labels don't update until I manually call the macro again. I want a way for the drawing document to remember which parts list each view is linked to, and then update automatically when the parts list changes. The balloons already do that anyway.

0 Likes