Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Reattach Balloon By Component

3 REPLIES 3
Reply
Message 1 of 4
dustinbagley
263 Views, 3 Replies

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

Using Reattach Balloon By Component

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")

 

3 REPLIES 3
Message 2 of 4
WCrihfield
in reply to: dustinbagley

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

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)

Message 3 of 4
dustinbagley
in reply to: dustinbagley

dustinbagley
Advocate
Advocate

Great, thanks. this did the trick.

0 Likes

Great, thanks. this did the trick.

Message 4 of 4
dustinbagley
in reply to: dustinbagley

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

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?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report