Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

I tested the .Delete call, and it works.

Created an assembly, and added two rules into it:

  1. AddRibbonTab
    Dim rib As Ribbon = ThisApplication.UserInterfaceManager.Ribbons("Assembly")
    
    Dim test As RibbonTab = rib.RibbonTabs.Add("Test","{A4C2F061-0DC3-46A5-8B31-508938EDB5B1}", "{A4C2F061-0DC3-46A5-8B31-508938EDB5B1}")
    
    Dim panel As RibbonPanel = test.RibbonPanels.Add("Update", "{DF5AA47C-1858-41D7-92B9-CB4BBB1BADF3}", "{A4C2F061-0DC3-46A5-8B31-508938EDB5B1}")
    
    Dim button As ButtonDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("AppLocalUpdateCmd")
    panel.CommandControls.AddButton(button, True)
    
    AlexKorzun_0-1617310828925.png

    The Tool tab is created with Update command in it

  2. DeleteRibbonTab
    Dim rib As Ribbon = ThisApplication.UserInterfaceManager.Ribbons("Assembly")
    
    Dim test As RibbonTab = rib.RibbonTabs("{A4C2F061-0DC3-46A5-8B31-508938EDB5B1}")
    
    test.Delete()

The "Test" tab is removed.

 

The rules should be run one after another.
Otherwise, the first rule fails on the second run, as RibbonTab is attempted to be created the second time.
The second rule will fail on the second run, in attempt to find non-existent RibbonTab. 

Thank you,




Alex Korzun
Inventor-Revit Interop / Inventor-Fusion Interop / Inventor ETO
Autodesk, Inc.