Using Reattach Balloon By Component

Using Reattach Balloon By Component

dustinbagley
Advocate Advocate
331 Views
3 Replies
Message 1 of 4

Using Reattach Balloon By Component

dustinbagley
Advocate
Advocate

I'm trying to use Balloons.AttachToComponent but not having any success.

dustinbagley_0-1677004363481.png

The balloons have been orphaned by suppressing the parts. I unsuppressed them before attempting to reattach. Also, reattaching them all at once functions but attaching by component name appears to do nothing. Any thoughts? Thanks

 

Dim ViewName As String
ViewName = "VIEW14"

'ActiveSheet.View(ViewName).Balloons.ReAttach
ActiveSheet.View(ViewName).Balloons.AttachToComponent("Part:1")
ActiveSheet.View(ViewName).Balloons.AttachToComponent("Part:2")

 

0 Likes
332 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor

Hi @dustinbagley.  I am honestly not that familiar with those specific iLogic shortcut snippets, but after reading the online Inventor Help documentation for those methods you are using, it seems that the AttachToComponent method (ICadViewBalloons.AttachToComponent) and its counterpart (ICadViewBalloons.DoNotAttachToComponent) are to be used as preparations, before using the Reattach (ICadViewBalloons.Reattach) method.  Then when you use the Reattach method, it know which ones to include, and which ones to not include.  So, you may just have to change the order of your lines of code to put the Reattach line last.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

dustinbagley
Advocate
Advocate

Great, thanks. this did the trick.

0 Likes
Message 4 of 4

dustinbagley
Advocate
Advocate

Upon further experimenting, I have found that 'AttachToComponent' only seems to work when the assembly has no sub-assemblies. However, 'DoNotAttachToComponent' works regardless of whether the assembly in the view has sub assemblies or not. Any thoughts?

0 Likes