Selection Zoom without Context Menu
Posted: Wed Feb 12, 2025 3:04 pm
Hello,
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.
Thanks,
Evan
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.
Code: Select all
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
Thanks,
Evan