- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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?!?
Solved! Go to Solution.