I am adding stuff in ribbon by adding xml file in
C:\Program Files\Autodesk\3ds Max 2023\en-US\UI\Ribbon\Extensions
file
<wpf:ResourceDictionary
xmlns="clr-namespace:WPFCustomControls;assembly=WPFCustomControls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ads="clr-namespace:Autodesk.Windows;assembly=AdWindows"
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:wpfcust="clr-namespace:WPFCustomControls;assembly=WPFCustomControls">
<MaxRibbonTab x:Key="Select" Title="Select" Name="Select">
<MaxModelingRibbonPanel IsAnonymous="False" IsVisible="True" ResizeStyle="NeverHideText, NeverCollapsePanel">
<MaxRibbonPanelSource Title="Select Tools">
<ads:RibbonRowPanel AllowInToolBar="false" MinWidth="100" ShowText="false" >
<ads:RibbonButton Text="Select All" ShowText="True" CommandHandler="{wpfcust:ActionItem MacroName=selectObjects, MacroCategory=test}"/>
</ads:RibbonRowPanel>
<ads:RibbonSeparator AllowInToolBar="false" MinWidth="0" ShowText="false" />
<ads:RibbonRowPanel AllowInToolBar="false" MinWidth="100" ShowText="false" >
<wpfcust:MaxRibbonCheckBox IsCheckable="true" ShowText="True" Text="shapes" Id="shp_ckb"/>
<ads:RibbonRowBreak AllowInToolBar="false" MinWidth="100" ShowText="false" />
<wpfcust:MaxRibbonCheckBox IsCheckable="true" ShowText="True" Text="geometry" Id="geo_ckb" />
</ads:RibbonRowPanel>
</MaxRibbonPanelSource>
</MaxModelingRibbonPanel>
</MaxRibbonTab>
</wpf:ResourceDictionary>
macroScript selectObjects category:"test" tooltip:"testSel"
(
on execute do (
ComponentManager = dotnetclass "Autodesk.Windows.ComponentManager"
tabs = ComponentManager.Ribbon.Tabs
selTab = undefined
for i = 0 to tabs.count-1 do (
if tabs.Item[i].Title == "Select" then selTab = tabs.Item[i]
)
shapeCkb = selTab.FindItem "shp_ckb"
geoCkb = selTab.FindItem "geo_ckb"
if (shapeCkb.IsChecked and geoCkb.IsChecked) then (select objects)
else if shapeCkb.IsChecked then (select shapes)
else if geoCkb.IsChecked then (select geometry)
)
)