Within the context of a VB.NET AddIn, I'm trying to find the upper level owning assembly via a Drawing Component. This is for a custom Item Bubbler I'm building (due to the nature of our data, we can not use SolidWorks BOM functionality).
For example, a user may click a part way down the tree when inserting an Item Bubble. What I want to do is get the owning assembly of that component, possibly up several levels, that is one under the child of the drawing - e.g., the Item that would be on that BOM.
I first get the DrawingComponent the user selected, then the model Component of that DrawingComponent via DrawingComponent.Component. Easy enough.
I then get the Parent Component of that model Component via Component.GetParent. Easy enough.
Where I run into problems is getting the Parent of that Parent Component - it always comes back empty, even though there are several layers to the upper level assembly.
Is there a fundamental issue using .GetParent to traverse UP an Assembly? Possibly an issue due to the fact I'm in a drawing and starting with the Drawing Component?
Any other ideas and/or a different approach?
Thank you for any help.