balloon renumbering across sheets
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to modify the code Brian Ekins posted on Mod the Machine to renumber balloons across sheets.
http://modthemachine.typepad.com/my_weblog/2011/02/index.html
It works great unless the item on the additional sheet is a sub-assembly. I believe it is because PartDef is declared as a PartComponentDefinition and there is nothing in the code to handle an assembly.
Dim partDef As PartComponentDefinition
Set partDef = drawBOMRow.BOMRow.ComponentDefinitions.Item(1)
partInfo(I - 1).ReferencedFile = partDef.Document.FullFileName
The Set partDef line was giving me a runtime error when it came to an assembly in the BOM until I added
"On Error Resume Next" at the start of the loop.
I tried changing the declaration to ComponentDefinition. It compiled fine, but didn't do anything. I think I'll have to add some duplicate code to handle an assembly in the BOM. Is there a better way to do this? Am I even on the right track?
Thanks for your help!