Placing a parts list in a newly created drawing no longer working properly after upgrading to 2024

Placing a parts list in a newly created drawing no longer working properly after upgrading to 2024

Liam.U
Contributor Contributor
201 Views
2 Replies
Message 1 of 3

Placing a parts list in a newly created drawing no longer working properly after upgrading to 2024

Liam.U
Contributor
Contributor

Hello,

 

We currently use a VBA macro to create a drawing which worked fine while using 2021 and having LevelofDetails rather than Model States. I've gone through the macro and replaced any mention of LevelOfDetailName with ModelStateName, "Master" with "[Primary]" and also replaced 

ComponentDefinition.RepresentationsManager.LevelOfDetailRepresentations.item("Master").Activate (True)

 with 

ComponentDefinition.ModelStates.item("[Primary]").Activate

This has fixed some issues but I can't figure out what is happening with the create drawing macro, it seems to work, it places the view and adds a parts list but the parts list placed isn't linked to the view placed. So when you go to balloon items you get the BOM properties diaglogue asking if you want it structured or parts-only and then once you've ballooned parts they don't appear to be ballooned in the placed parts list.

The current work-around is to delete the parts list and place a new one but I'd like to fix the code properly. When you open the bom from the parts list in the drawing it is adding (___LODFactoryRep) on to the filename so I feel like it's something to do with Model States but that is a term/phrase that we have never used.

 

Any ideas?!?

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

bradeneuropeArthur
Mentor
Mentor
Could you upload the complete code, because there may be many things that may be wrong!

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

Liam.U
Contributor
Contributor
Accepted solution

I figured it out! The original code placed the parts list BEFORE placing the view so it was linked to the model rather than the view which never caused an issue previously. Now I place the parts list AFTER placing the view and link it to the view rather than the model so it now says [Primary] instead of ___LODFactoryRep and ballooning works properly.

0 Likes