Contextual and custom mini toolbar problem

Contextual and custom mini toolbar problem

AttilaFarkas
Advocate Advocate
1,789 Views
7 Replies
Message 1 of 8

Contextual and custom mini toolbar problem

AttilaFarkas
Advocate
Advocate

Hi All,

 

I have some problem with the mini toolbars.

In many cases when I want to work with selected enities the best place for custom commands should be the Contextual Mini Toolbar or a Custom Mini Toolbar.

 

1. Primarily I would like to customize the contextual mini toolbar using the OnContextualMiniToolbar event. It works fine if I select objects manually or using command from the ribbon but if I change the selection using a custom command from an active contextual mini toolbar then the mini toolbar dissapears and not appears again in context of newly selected entities.

 

ContextualMiniToolbar01.jpg: I select an edge manually and add my custom command to the mini toolbar. It works great.

ContextualMiniToolbar02.jpg: I click my custom command and add more edges to the selection -> no mini toolbar. Why?

ContextualMiniToolbar03.jpg: I select the same edges manually -> the min toolbar appears again (I didn't add custom command to it in this case)

 

2. If I use my own minitoolbar then I have to face with another problem: how can I add original commands (for example fillet or chamfer) to my own mini toolbar?

 

Thanks in advance.

 

Attila Farkas

 

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

MechMachineMan
Advisor
Advisor
I would assume by accessing the control definition for that specific command.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 8

AttilaFarkas
Advocate
Advocate

Hi,

 

Thanks for your reply. The issue is not depends on what the command does exactly, If it started from the contextual toolbar and it changes the selection, then the toolbar dissapears and not appears again.

 

Regards,

 

Attila

0 Likes
Message 4 of 8

adam.nagy
Autodesk Support
Autodesk Support

Hi Attila,

 

I think Justin's comment was concerning issue #2, i.e. how to add built-in commands to your toolbar.

 

Concerning issue #1 I seemed to be able to reproduce it from a VBA function as well that selection modification toggled the visibilty of the mini contextual toolbar, but now I cannot. Not sure what I did differently before.

Have to check with the others to see if they can think of a way to make it re-appear.

 

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 5 of 8

AttilaFarkas
Advocate
Advocate

Hi Justin,

 

All of the Add... functions of the minitoolbar creates new button definition, as I see there isn't any way to add built-in commands. During the selection process I would like to keep the built-in commands suggested by the software and only extend the functionality with my own commands. Therefore I would prefer the contextual minitoolbar.

 

Regards,

 

Attila

 

0 Likes
Message 6 of 8

AttilaFarkas
Advocate
Advocate

Hi Adam,

 

Thank you very much for your investigation. I attached a sample code and linked a video about this issue. I hope this helps to find the solution.

I also show in the video that if I run the same command from the toolbar, than everything works fine.

 

Regards,

 

Attila

0 Likes
Message 7 of 8

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Thanks for the extra info and video.

 

I logged the behaviour in our system so it can be investigated: #86697

 

I also managed to come up with a workaround:
http://adndevblog.typepad.com/manufacturing/2015/08/change-selection-from-a-mini-contextual-toolbar-...

 

Cheers,



Adam Nagy
Autodesk Platform Services
Message 8 of 8

AttilaFarkas
Advocate
Advocate

Hi Adam,

 

I've tried your workaround and it works great. I will use this until it not works normally.

Many thanks for your help!

 

Best regards,

 

Attila Farkas

0 Likes