Is it possible to call selection zoom without using the context menu? I am trying to zoom using a button. I am running version 7.2 build 5545.
I can find the option in the context menu using IMenu_KC and IMenuItem_KC but using IMenuItem_KC.execute does nothing. (IMenuItem_KC.GetText returns "Selection Zoom" so I believe it is the right index) Below is example code.
Dim MenuItem As IMenuItem_KC
Dim Menu As IMenu_KC, MenuAdvanced As IMenu_KC
Set Menu = MyView3D
Set MenuAdvanced = Menu.GetSubMenu(8) ' advanced submenu
Set MenuItem = MenuAdvanced.GetItemAt(3) ' zoom selection
Debug.Print MenuItem.GetText ' returns "Selection Zoom"
MenuItem.execute
I have reproduced this. It seems to be a bug. We need to do more checks to be sure. The call is kind of generic and got lost during code splits for various types of controls. We are looking into this.
For other readers:
We do not have currently a _DG version of IMenu_KC. So, it is not available in .NET controls, unfortunately. We have added this to the to-do list for v7.3.