Attach Balloon without right click menu ?

Attach Balloon without right click menu ?

Anonymous
Not applicable
1,324 Views
7 Replies
Message 1 of 8

Attach Balloon without right click menu ?

Anonymous
Not applicable

I prefer to use the "radial menu only" selection in the markings menuimage.png

 

 

 

Problem is, the only way I've been able to find to attach a stacked balloon is by using the right click context menu

 

image.png

 

 

 

I cannot find any way to attach a stacked balloon without turning on the right click context menu.

it doesn't appear to be an option to add to either the ribbon or the radial menu

 

image.png

 

any help would be appreciated

 

thanks!!

 

 

 

 

 

 

 

0 Likes
Accepted solutions (1)
1,325 Views
7 Replies
Replies (7)
Message 2 of 8

clutsa
Collaborator
Collaborator

I made a custom Sub in VBA and assigned that sub to the wheel. You can see if that works for you.

Sub AttachBalloon()
    Dim doc As DrawingDocument
    Set doc = ThisApplication.ActiveDocument
    doc.SelectSet.Select (ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingBalloonFilter, "Select a balloon to attach to."))
    ThisApplication.CommandManager.ControlDefinitions("DrawingAttachBalloonCtxCmd").Execute
End Sub
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

Message 3 of 8

Anonymous
Not applicable

Clutsa, thank you for taking the time two write that up for me. I'm having a bit of trouble implementing it however.image.png

 

I also noticed that my radial menu does not come up when I have a balloon selected, so that part may not work either. I may need to select the balloon and then select and run the ilogic from the ilogic toolbar

0 Likes
Message 4 of 8

clutsa
Collaborator
Collaborator
Accepted solution

I wrote that code for VBA. We could certainly turn it into an external iLogic rule too but I threw a video together to show you how to add it to VBA as well.

 

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 5 of 8

Anonymous
Not applicable

Clusta,

 

Thank you for the video, that helped a ton. I was able to get the macro up and running and it works beautifully. however it only appears to work once or twice before inventor crashes.

 

not sure whats causing that

 

image.png 

0 Likes
Message 6 of 8

clutsa
Collaborator
Collaborator

I'm not having that problem... since you have a fairly repeatable problem I would fill out the crash report (e-mail and details). Autodesk has always been really great about getting back to me. 

You can try this code but I don't think that will really change anything.

Sub AttachBalloon()
    Dim app As Application
    Set app = ThisApplication
    Dim ComMan As CommandManager
    Set ComMan = app.CommandManager
    Dim doc As DrawingDocument
    Set doc = app.ActiveDocument
    doc.SelectSet.Select (ComMan.Pick(SelectionFilterEnum.kDrawingBalloonFilter, "Select a balloon to attach to."))
    ComMan.ControlDefinitions("DrawingAttachBalloonCtxCmd").Execute
    Set ComMan = Nothing
    Set doc = Nothing
    Set app = Nothing
End Sub
If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes
Message 7 of 8

Anonymous
Not applicable

hmm still having the same problem with the new code.

I'll send the crash report to autodesk and see what they come back with.

but, in the meantime, with careful usage this macro is great. 

 

thank you for all of your time. 

0 Likes
Message 8 of 8

clutsa
Collaborator
Collaborator

I did get an error (but not a crash) if I tried to escape out ILO picking a balloon... This seems to have fixed that.

Sub AttachBalloon()
    Dim app As Application
    Set app = ThisApplication
    Dim ComMan As CommandManager
    Set ComMan = app.CommandManager
    Dim doc As DrawingDocument
    Set doc = app.ActiveDocument
    Dim oBalloon As Variant
    Set oBalloon = ComMan.Pick(SelectionFilterEnum.kDrawingBalloonFilter, "Select a balloon to attach to.")
    If Not oBalloon Is Nothing Then
        doc.SelectSet.Clear
        doc.SelectSet.Select (oBalloon)
        ComMan.ControlDefinitions("DrawingAttachBalloonCtxCmd").Execute
    End If
End Sub 

 

If I've helped you, please help me by supporting this idea.
Mass Override for Each Model State

Custom Glyph Icon for iMates

0 Likes