- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @phankinsTURWH. Unfortunately, that error description does not help me diagnose what or where the problem might be. I know that it might throw an error if it does not find a BalloonStyle named "SUB" within the BalloonStyles of your document, because we are not setting the value of that variable within a Try...Catch block to handle that potential error. Also, I just assume that every 'attached' Balloon will have at least 1 BalloonValueSet, because I have not seen any documentation specifying that a Balloon's BalloonValueSets collection might not contain any Items. We could try testing if the BalloonValueSets.Count = 0, or something like that, before attempting to access its first Item. If it equals zero, then use Continue For, so it will skip to the next Balloon in the loop, before trying to access its first Item. The next possibility that comes to mind is where we are accessing the BalloonValueSet.ReferencedRow proeprty, expecting to get a DrawingBOMRow object from it. I did not see any documentation that says that this might thrown an error or return Nothing, under certain circumstances, but this might be possible. I have already checked if the Balloon is attached, so that would not be the cause. Maybe if the BalloonValueSet.Static = True, then maybe that would nullify the ReferencedRow property from working properly, but I am not sure. The next row is checking for 'Virtual' or 'Custom', so I would not think either of those scenarios would be a problem before that point in the code. I know that we should not need to check the DrawingBOMRow.Ballooned property, because we are starting from existing Balloon objects themselves.
Could you maybe look through the data within the 'More Info' tab of the error message, and if anything there sounds even remotely potentially useful, translate its contents here for me/us? I almost always find something within that information that is helps me find the location within the code where it is encountering an issue.
Wesley Crihfield
(Not an Autodesk Employee)