Flyout menu

Flyout menu

GeorgK
Advisor Advisor
2,291 Views
19 Replies
Message 1 of 20

Flyout menu

GeorgK
Advisor
Advisor

Hello together,

 

is it possible to add a flyout menu? There was only the response that it does not work.

 

http://forums.autodesk.com/t5/inventor-customization/create-a-flyout-menu-in-context-menu-net/m-p/53...

 

Is there any sample?

 

Best regards

 

Georg

0 Likes
Accepted solutions (2)
2,292 Views
19 Replies
Replies (19)
Message 2 of 20

Jon.Dean
Alumni
Alumni

Hi Georg,

There is no Flyout menu as such but if you minimize the menus, you can get a sort of Flyout.

Flyout.png

Otherwise the answer is no.

Jon.



Jon Dean

0 Likes
Message 3 of 20

GeorgK
Advisor
Advisor

Hello Jon,

 

I mean the flyout when you click the RMB for example in a drawing and get the context menu. It is possible to make a flyout in thr ribbon bar.

 

Georg

0 Likes
Message 4 of 20

ekinsb
Alumni
Alumni

I'm a bit confused what it is you're trying to do.  You mention a context menu but also the ribbon.  I believe the only place fly-outs are supported in the user-interface is in the conext menu, as shown below.  Is this what you want to do?

 

DropDown.png 


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 5 of 20

GeorgK
Advisor
Advisor

Hello Brian,

 

its the user-interface with the conext menu. Sorry for the confusion. Do you have an example? I tried to add it to the ordinate dimension add-in

 

http://forums.autodesk.com/t5/inventor-customization/edit-ordinatedimension-with-vb-net/td-p/3759478

 

But I could not get it running.

 

Georg

0 Likes
Message 6 of 20

Jon.Dean
Alumni
Alumni

Hi Georg,

Hopefully Brian will get back to you soon with a reply.

Jon.



Jon Dean

0 Likes
Message 7 of 20

xiaodong_liang
Autodesk Support
Autodesk Support

Hi Georg,

 

could you elaborate what is your difficulty? In the other post my colleague Adam recommended a blog which exactly introduces how to create context menu. Have you been able to make that sample project work? In case you did not find it, I enclosed the download link directly.

 VB.NET project

 

Or, this sample is not what you need?

 

0 Likes
Message 8 of 20

GeorgK
Advisor
Advisor

Hello Xiaodong,

 

the problem is to make a flyout menu for a drawing. I would like to edit an ordinate dimension and add some text at the end.

 

FlyoutMenu.jpg

 

Thank you Georg

0 Likes
Message 9 of 20

adam.nagy
Autodesk Support
Autodesk Support

Hi Georg,

 

You can add single items to the context menu, that's not a problem.

The problem is with adding children to them. This behaviour has been logged in our database under id #56842, but I think it has not been sorted yet. 😞

 

So for the time being you would have to add all the children a level higher:

 

original.jpeg

 

Sorry for the bad news 😞

 

Cheers,

 

 



Adam Nagy
Autodesk Platform Services
0 Likes
Message 10 of 20

GeorgK
Advisor
Advisor

Hello Adam,

 

is it possible to make a separate context menu when I choose an ordinate dimension? Do you have a sample for it? The standard menu would be very long.

 

Thank you

 

Georg

0 Likes
Message 11 of 20

adam.nagy
Autodesk Support
Autodesk Support

Hi Georg,

 

You customize the context menu by modifying its content inside the "OnLinearMarkingMenu" event handler.

That event also has a "SelectedEntities" input parameter, so based on what entities are selected you can modify the context menu's content differently

 

Cheers, 



Adam Nagy
Autodesk Platform Services
0 Likes
Message 12 of 20

GeorgK
Advisor
Advisor

Hello Adam,

 

do you have an example for it? How to edit the ordinate dimension and add some text? To edit the ordinate dimension is solved here:

 

http://forums.autodesk.com/t5/inventor-customization/edit-ordinatedimension-with-vb-net/m-p/3759478/...

 

But how to get it in the context menu? I tried it but could not get it running.

 

Thank you Georg

 

 

0 Likes
Message 13 of 20

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Hi Georg,

 

I'm not sure what issue you run into.

I've written a post that might help:

http://adndevblog.typepad.com/manufacturing/2015/03/entity-specific-context-menu.html

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 14 of 20

GeorgK
Advisor
Advisor
Hello Adam,

thats great. Thank you.

Georg
0 Likes
Message 15 of 20

GeorgK
Advisor
Advisor

Hello Adam,

is it possible to add this to an OrdinateDimensionSet?

Thank you Georg

0 Likes
Message 16 of 20

adam.nagy
Autodesk Support
Autodesk Support

You mean adding it to the context menu?

You just have to check for that entity type as well and if it is that, then add it.



Adam Nagy
Autodesk Platform Services
0 Likes
Message 17 of 20

GeorgK
Advisor
Advisor

Hello Adam,

 

I mean to change the program from an ordinatedimension to an ordinatedimensionset:

http://adndevblog.typepad.com/manufacturing/2015/03/entity-specific-context-menu.html

 

OrdinateDimensionSet.jpg

Sorry for the confusion.

 

Georg

0 Likes
Message 18 of 20

adam.nagy
Autodesk Support
Autodesk Support

You just have to modify the bd1_OnExecute function's code to handle that:

Private Sub bd1_OnExecute(ByVal Context As NameValueMap)
  Dim ss As SelectSet
  Set ss = ThisApplication.ActiveDocument.SelectSet

  Dim ordDim As OrdinateDimension
  For Each ordDim In ss
    ' If the dimension belongs to a dimension set
    ' then do the operation on all the other dimensions
    ' that belong to that set
    If Not ordDim.OrdinateDimensionSet Is Nothing Then
      Dim ordDimSet As OrdinateDimensionSet
      Set ordDimSet = ordDim.OrdinateDimensionSet
      
      Dim ordDim2 As OrdinateDimension
      For Each ordDim2 In ordDimSet.Members
        ' Change the text of the selected ordinate dimension
        ordDim2.Text.FormattedText = _
          ordDim2.Text.FormattedText + "+"
      Next
    Else
      ' Change the text of the selected ordinate dimension
      ordDim.Text.FormattedText = _
        ordDim.Text.FormattedText + "+"
    End If
  Next
End Sub

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 19 of 20

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Hi Georg,

 

Is this what you need?

http://adndevblog.typepad.com/manufacturing/2015/04/set-context-menu-for-ordinatedimensionset-member...

 

I really hope so 🙂

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 20 of 20

GeorgK
Advisor
Advisor
Hello Adam,

thats exactly what I am looking for.

Thank you very much.

Georg
0 Likes