<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom Ribbon Tabs in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13831088#M177281</link>
    <description>&lt;P&gt;&lt;STRONG&gt;The Goal:&lt;/STRONG&gt; Create a custom ribbon tab in the zero document environment labeled "OP".&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The Problem:&lt;/STRONG&gt; The tab is being created, but the UI is being reset shortly after - removing the new tab.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The Twist:&lt;/STRONG&gt; I've disabled every other addin just to make sure nothing external could be affecting it. I also added diagnostics to check whether the new tab still exists internally, and apparently it does, though I cannot see it. Has anybody else encountered this issue or might be able to offer some insight? Perhaps there's something obvious in the code that I've overlooked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Imports System.Runtime.InteropServices
Imports Inventor

' This GUID must match the ClassId and ClientId in your .addin file.
' The ComVisible(True) attribute makes this class visible to COM, which is how Inventor finds it.
&amp;lt;GuidAttribute("33B4722C-392E-4E34-9EA3-2E73DD0F1C13"), ComVisible(True)&amp;gt;
Public Class StandardAddInServer
    Implements ApplicationAddInServer

    Private m_inventorApplication As Application
    Private WithEvents m_appEvents As ApplicationEvents
    Private m_uiCreated As Boolean = False

    ' Store references to all created tabs to prevent garbage collection.
    Private m_tabs As New List(Of Inventor.RibbonTab)

    ' Use the user's local app data folder for the log file to avoid permissions issues.
    Private ReadOnly m_logFile As String = System.IO.Path.Combine(
        System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), "NewTabAddin", "log.txt")

    Private Sub Log(message As String)
        ' This function will write a timestamped message to our log file.
        Try
            Dim logDirectory As String = System.IO.Path.GetDirectoryName(m_logFile)
            If Not System.IO.Directory.Exists(logDirectory) Then
                System.IO.Directory.CreateDirectory(logDirectory)
            End If

            Dim logMessage = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} - {message}{vbCrLf}"
            System.IO.File.AppendAllText(m_logFile, logMessage)
        Catch ex As Exception
            ' If logging fails, we can't do much, but this prevents a crash.
        End Try
    End Sub

    Public Sub Activate(ByVal addInSiteObject As ApplicationAddInSite, ByVal firstTime As Boolean) Implements ApplicationAddInServer.Activate
        Log("--- Add-in Activate Started ---")

        m_inventorApplication = addInSiteObject.Application
        Log("Successfully acquired Inventor Application object.")

        ' Hook into the OnReady event. This event fires once Inventor is fully loaded and idle.
        ' This is the most reliable time to create UI elements.
        m_appEvents = m_inventorApplication.ApplicationEvents
        Log("ApplicationEvents handler set up. Waiting for OnReady event.")

        Log("--- Add-in Activate Finished ---")
    End Sub

    Private Sub AppEvents_OnReady() Handles m_appEvents.OnReady
        Log("--- Inventor OnReady event fired. ---")
        ' The OnReady event can sometimes fire more than once. The flag ensures we only create the UI once.
        If Not m_uiCreated Then
            Log("UI not yet created. Proceeding to create UI.")
            CreateUserInterface()
            m_uiCreated = True
        End If
    End Sub

    Private Sub CreateUserInterface()
        Try
            Log("CreateUserInterface method started.")
            Dim uiMan As UserInterfaceManager = m_inventorApplication.UserInterfaceManager
            Log("Successfully acquired UserInterfaceManager.")

            If uiMan.InterfaceStyle = InterfaceStyleEnum.kRibbonInterface Then
                Log("Ribbon interface is active. Proceeding to create tabs.")

                ' Define the list of ribbons where the tab should appear.
                Dim ribbonNames As String() = {"ZeroDoc", "Part", "Assembly", "Drawing"}

                For Each ribbonName In ribbonNames
                    Try
                        Dim ribbon As Ribbon = uiMan.Ribbons.Item(ribbonName)
                        Log($"Successfully acquired '{ribbonName}' ribbon.")

                        ' Use a helper function to create the tab to avoid code duplication.
                        AddTabToRibbon(ribbon)

                    Catch ex As Exception
                        Log($"!!! WARNING: Could not access or modify the '{ribbonName}' ribbon. {ex.Message}")
                    End Try
                Next
            Else
                Log("Ribbon interface is not active. Aborting UI creation.")
            End If
            Log("--- UI Creation Finished ---")
        Catch ex As Exception
            Log($"!!! FATAL ERROR during UI Creation: {ex.ToString()} !!!")
        End Try
    End Sub

    Private Sub AddTabToRibbon(ByVal targetRibbon As Ribbon)
        Try
            ' Check if the tab already exists on this specific ribbon.
            Dim existingTab As Inventor.RibbonTab = Nothing
            Try
                existingTab = targetRibbon.RibbonTabs.Item("id_Tab_OP")
            Catch
                ' Item throws an error if not found, so we catch it and proceed.
            End Try

            If existingTab IsNot Nothing Then
                Log($"Found existing 'OP' tab on ribbon '{targetRibbon.DisplayName}'. No action needed.")
            Else
                Log($"'OP' tab not found on ribbon '{targetRibbon.DisplayName}', attempting to create it now.")
                Dim newTab As Inventor.RibbonTab = targetRibbon.RibbonTabs.Add(
                    DisplayName:="OP",
                    InternalName:="id_Tab_OP",
                    ClientId:="{33B4722C-392E-4E34-9EA3-2E73DD0F1C13}")

                ' IMPORTANT: Add the new tab to our class-level list to keep it alive.
                m_tabs.Add(newTab)
                Log($"Successfully created 'OP' tab on ribbon '{targetRibbon.DisplayName}'.")
            End If
        Catch ex As Exception
            Log($"!!! ERROR adding tab to ribbon '{targetRibbon.DisplayName}': {ex.Message}")
        End Try
    End Sub

    Public Sub Deactivate() Implements ApplicationAddInServer.Deactivate
        Log("--- Add-in Deactivate ---")

        ' Clean up all created tab objects.
        For Each tab As Inventor.RibbonTab In m_tabs
            If tab IsNot Nothing Then
                Try
                    tab.Delete()
                    Marshal.ReleaseComObject(tab)
                Catch ex As Exception
                    Log($"Error during tab cleanup: {ex.Message}")
                End Try
            End If
        Next
        m_tabs.Clear()

        If m_inventorApplication IsNot Nothing Then
            Marshal.ReleaseComObject(m_inventorApplication)
            m_appEvents = Nothing
            m_inventorApplication = Nothing
        End If

        GC.Collect()
        GC.WaitForPendingFinalizers()
    End Sub

    Public ReadOnly Property Automation As Object Implements ApplicationAddInServer.Automation
        Get
            Return Nothing
        End Get
    End Property

    Public Sub ExecuteCommand(ByVal commandID As Integer) Implements ApplicationAddInServer.ExecuteCommand
        ' This method is obsolete.
    End Sub
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;Addin Type="Standard"&amp;gt;
	&amp;lt;!-- The Assembly name is the name of your output DLL. --&amp;gt;
	&amp;lt;Assembly&amp;gt;NewTab.dll&amp;lt;/Assembly&amp;gt;
	&amp;lt;!-- The ClientId must match the GUID in your StandardAddInServer class. --&amp;gt;
	&amp;lt;ClientId&amp;gt;{33B4722C-392E-4E34-9EA3-2E73DD0F1C13}&amp;lt;/ClientId&amp;gt;
	&amp;lt;!-- The ClassId must also match the GUID in your StandardAddInServer class. --&amp;gt;
	&amp;lt;ClassId&amp;gt;{33B4722C-392E-4E34-9EA3-2E73DD0F1C13}&amp;lt;/ClassId&amp;gt;
	&amp;lt;DisplayName&amp;gt;New Tab Add-in&amp;lt;/DisplayName&amp;gt;
	&amp;lt;Description&amp;gt;A simple add-in that creates a new ribbon tab.&amp;lt;/Description&amp;gt;
	&amp;lt;LoadOnStartup&amp;gt;1&amp;lt;/LoadOnStartup&amp;gt;
	&amp;lt;UserUnloadable&amp;gt;1&amp;lt;/UserUnloadable&amp;gt;
	&amp;lt;Hidden&amp;gt;0&amp;lt;/Hidden&amp;gt;
	&amp;lt;SupportedSoftwareVersionGreaterThan&amp;gt;28&amp;lt;/SupportedSoftwareVersionGreaterThan&amp;gt;
&amp;lt;/Addin&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;&amp;lt;Project Sdk="Microsoft.NET.Sdk"&amp;gt;

  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;TargetFramework&amp;gt;net8.0-windows&amp;lt;/TargetFramework&amp;gt;
    &amp;lt;ImplicitUsings&amp;gt;enable&amp;lt;/ImplicitUsings&amp;gt;
    &amp;lt;Nullable&amp;gt;enable&amp;lt;/Nullable&amp;gt;
    &amp;lt;EnableComHosting&amp;gt;true&amp;lt;/EnableComHosting&amp;gt;
    &amp;lt;AutoGenerateBindingRedirects&amp;gt;true&amp;lt;/AutoGenerateBindingRedirects&amp;gt;
  &amp;lt;/PropertyGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;COMReference Include="Inventor"&amp;gt;
      &amp;lt;WrapperTool&amp;gt;tlbimp&amp;lt;/WrapperTool&amp;gt;
      &amp;lt;VersionMinor&amp;gt;0&amp;lt;/VersionMinor&amp;gt;
      &amp;lt;VersionMajor&amp;gt;1&amp;lt;/VersionMajor&amp;gt;
      &amp;lt;Guid&amp;gt;d98a091d-3a0f-4c3e-b36e-61f62068d488&amp;lt;/Guid&amp;gt;
      &amp;lt;Lcid&amp;gt;0&amp;lt;/Lcid&amp;gt;
      &amp;lt;Isolated&amp;gt;false&amp;lt;/Isolated&amp;gt;
      &amp;lt;EmbedInteropTypes&amp;gt;False&amp;lt;/EmbedInteropTypes&amp;gt;
    &amp;lt;/COMReference&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;Reference Include="AdWindows"&amp;gt;
      &amp;lt;HintPath&amp;gt;C:\Program Files\Autodesk\Inventor 2026\Bin\AdWindows.dll&amp;lt;/HintPath&amp;gt;
      &amp;lt;Private&amp;gt;False&amp;lt;/Private&amp;gt;
    &amp;lt;/Reference&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;None Update="NewTab.addin"&amp;gt;
      &amp;lt;CopyToOutputDirectory&amp;gt;PreserveNewest&amp;lt;/CopyToOutputDirectory&amp;gt;
    &amp;lt;/None&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;Target Name="PostBuild" AfterTargets="PostBuildEvent"&amp;gt;
    &amp;lt;Exec Command="xcopy /y /d &amp;amp;quot;$(TargetDir)*.*&amp;amp;quot; &amp;amp;quot;%APPDATA%\Autodesk\Inventor 2026\Addins\&amp;amp;quot;" /&amp;gt;
  &amp;lt;/Target&amp;gt;

&amp;lt;/Project&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Sep 2025 12:18:37 GMT</pubDate>
    <dc:creator>HogueOne</dc:creator>
    <dc:date>2025-09-30T12:18:37Z</dc:date>
    <item>
      <title>Custom Ribbon Tabs</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13831088#M177281</link>
      <description>&lt;P&gt;&lt;STRONG&gt;The Goal:&lt;/STRONG&gt; Create a custom ribbon tab in the zero document environment labeled "OP".&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The Problem:&lt;/STRONG&gt; The tab is being created, but the UI is being reset shortly after - removing the new tab.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;The Twist:&lt;/STRONG&gt; I've disabled every other addin just to make sure nothing external could be affecting it. I also added diagnostics to check whether the new tab still exists internally, and apparently it does, though I cannot see it. Has anybody else encountered this issue or might be able to offer some insight? Perhaps there's something obvious in the code that I've overlooked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Imports System.Runtime.InteropServices
Imports Inventor

' This GUID must match the ClassId and ClientId in your .addin file.
' The ComVisible(True) attribute makes this class visible to COM, which is how Inventor finds it.
&amp;lt;GuidAttribute("33B4722C-392E-4E34-9EA3-2E73DD0F1C13"), ComVisible(True)&amp;gt;
Public Class StandardAddInServer
    Implements ApplicationAddInServer

    Private m_inventorApplication As Application
    Private WithEvents m_appEvents As ApplicationEvents
    Private m_uiCreated As Boolean = False

    ' Store references to all created tabs to prevent garbage collection.
    Private m_tabs As New List(Of Inventor.RibbonTab)

    ' Use the user's local app data folder for the log file to avoid permissions issues.
    Private ReadOnly m_logFile As String = System.IO.Path.Combine(
        System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), "NewTabAddin", "log.txt")

    Private Sub Log(message As String)
        ' This function will write a timestamped message to our log file.
        Try
            Dim logDirectory As String = System.IO.Path.GetDirectoryName(m_logFile)
            If Not System.IO.Directory.Exists(logDirectory) Then
                System.IO.Directory.CreateDirectory(logDirectory)
            End If

            Dim logMessage = $"{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff} - {message}{vbCrLf}"
            System.IO.File.AppendAllText(m_logFile, logMessage)
        Catch ex As Exception
            ' If logging fails, we can't do much, but this prevents a crash.
        End Try
    End Sub

    Public Sub Activate(ByVal addInSiteObject As ApplicationAddInSite, ByVal firstTime As Boolean) Implements ApplicationAddInServer.Activate
        Log("--- Add-in Activate Started ---")

        m_inventorApplication = addInSiteObject.Application
        Log("Successfully acquired Inventor Application object.")

        ' Hook into the OnReady event. This event fires once Inventor is fully loaded and idle.
        ' This is the most reliable time to create UI elements.
        m_appEvents = m_inventorApplication.ApplicationEvents
        Log("ApplicationEvents handler set up. Waiting for OnReady event.")

        Log("--- Add-in Activate Finished ---")
    End Sub

    Private Sub AppEvents_OnReady() Handles m_appEvents.OnReady
        Log("--- Inventor OnReady event fired. ---")
        ' The OnReady event can sometimes fire more than once. The flag ensures we only create the UI once.
        If Not m_uiCreated Then
            Log("UI not yet created. Proceeding to create UI.")
            CreateUserInterface()
            m_uiCreated = True
        End If
    End Sub

    Private Sub CreateUserInterface()
        Try
            Log("CreateUserInterface method started.")
            Dim uiMan As UserInterfaceManager = m_inventorApplication.UserInterfaceManager
            Log("Successfully acquired UserInterfaceManager.")

            If uiMan.InterfaceStyle = InterfaceStyleEnum.kRibbonInterface Then
                Log("Ribbon interface is active. Proceeding to create tabs.")

                ' Define the list of ribbons where the tab should appear.
                Dim ribbonNames As String() = {"ZeroDoc", "Part", "Assembly", "Drawing"}

                For Each ribbonName In ribbonNames
                    Try
                        Dim ribbon As Ribbon = uiMan.Ribbons.Item(ribbonName)
                        Log($"Successfully acquired '{ribbonName}' ribbon.")

                        ' Use a helper function to create the tab to avoid code duplication.
                        AddTabToRibbon(ribbon)

                    Catch ex As Exception
                        Log($"!!! WARNING: Could not access or modify the '{ribbonName}' ribbon. {ex.Message}")
                    End Try
                Next
            Else
                Log("Ribbon interface is not active. Aborting UI creation.")
            End If
            Log("--- UI Creation Finished ---")
        Catch ex As Exception
            Log($"!!! FATAL ERROR during UI Creation: {ex.ToString()} !!!")
        End Try
    End Sub

    Private Sub AddTabToRibbon(ByVal targetRibbon As Ribbon)
        Try
            ' Check if the tab already exists on this specific ribbon.
            Dim existingTab As Inventor.RibbonTab = Nothing
            Try
                existingTab = targetRibbon.RibbonTabs.Item("id_Tab_OP")
            Catch
                ' Item throws an error if not found, so we catch it and proceed.
            End Try

            If existingTab IsNot Nothing Then
                Log($"Found existing 'OP' tab on ribbon '{targetRibbon.DisplayName}'. No action needed.")
            Else
                Log($"'OP' tab not found on ribbon '{targetRibbon.DisplayName}', attempting to create it now.")
                Dim newTab As Inventor.RibbonTab = targetRibbon.RibbonTabs.Add(
                    DisplayName:="OP",
                    InternalName:="id_Tab_OP",
                    ClientId:="{33B4722C-392E-4E34-9EA3-2E73DD0F1C13}")

                ' IMPORTANT: Add the new tab to our class-level list to keep it alive.
                m_tabs.Add(newTab)
                Log($"Successfully created 'OP' tab on ribbon '{targetRibbon.DisplayName}'.")
            End If
        Catch ex As Exception
            Log($"!!! ERROR adding tab to ribbon '{targetRibbon.DisplayName}': {ex.Message}")
        End Try
    End Sub

    Public Sub Deactivate() Implements ApplicationAddInServer.Deactivate
        Log("--- Add-in Deactivate ---")

        ' Clean up all created tab objects.
        For Each tab As Inventor.RibbonTab In m_tabs
            If tab IsNot Nothing Then
                Try
                    tab.Delete()
                    Marshal.ReleaseComObject(tab)
                Catch ex As Exception
                    Log($"Error during tab cleanup: {ex.Message}")
                End Try
            End If
        Next
        m_tabs.Clear()

        If m_inventorApplication IsNot Nothing Then
            Marshal.ReleaseComObject(m_inventorApplication)
            m_appEvents = Nothing
            m_inventorApplication = Nothing
        End If

        GC.Collect()
        GC.WaitForPendingFinalizers()
    End Sub

    Public ReadOnly Property Automation As Object Implements ApplicationAddInServer.Automation
        Get
            Return Nothing
        End Get
    End Property

    Public Sub ExecuteCommand(ByVal commandID As Integer) Implements ApplicationAddInServer.ExecuteCommand
        ' This method is obsolete.
    End Sub
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;Addin Type="Standard"&amp;gt;
	&amp;lt;!-- The Assembly name is the name of your output DLL. --&amp;gt;
	&amp;lt;Assembly&amp;gt;NewTab.dll&amp;lt;/Assembly&amp;gt;
	&amp;lt;!-- The ClientId must match the GUID in your StandardAddInServer class. --&amp;gt;
	&amp;lt;ClientId&amp;gt;{33B4722C-392E-4E34-9EA3-2E73DD0F1C13}&amp;lt;/ClientId&amp;gt;
	&amp;lt;!-- The ClassId must also match the GUID in your StandardAddInServer class. --&amp;gt;
	&amp;lt;ClassId&amp;gt;{33B4722C-392E-4E34-9EA3-2E73DD0F1C13}&amp;lt;/ClassId&amp;gt;
	&amp;lt;DisplayName&amp;gt;New Tab Add-in&amp;lt;/DisplayName&amp;gt;
	&amp;lt;Description&amp;gt;A simple add-in that creates a new ribbon tab.&amp;lt;/Description&amp;gt;
	&amp;lt;LoadOnStartup&amp;gt;1&amp;lt;/LoadOnStartup&amp;gt;
	&amp;lt;UserUnloadable&amp;gt;1&amp;lt;/UserUnloadable&amp;gt;
	&amp;lt;Hidden&amp;gt;0&amp;lt;/Hidden&amp;gt;
	&amp;lt;SupportedSoftwareVersionGreaterThan&amp;gt;28&amp;lt;/SupportedSoftwareVersionGreaterThan&amp;gt;
&amp;lt;/Addin&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;&amp;lt;Project Sdk="Microsoft.NET.Sdk"&amp;gt;

  &amp;lt;PropertyGroup&amp;gt;
    &amp;lt;TargetFramework&amp;gt;net8.0-windows&amp;lt;/TargetFramework&amp;gt;
    &amp;lt;ImplicitUsings&amp;gt;enable&amp;lt;/ImplicitUsings&amp;gt;
    &amp;lt;Nullable&amp;gt;enable&amp;lt;/Nullable&amp;gt;
    &amp;lt;EnableComHosting&amp;gt;true&amp;lt;/EnableComHosting&amp;gt;
    &amp;lt;AutoGenerateBindingRedirects&amp;gt;true&amp;lt;/AutoGenerateBindingRedirects&amp;gt;
  &amp;lt;/PropertyGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;COMReference Include="Inventor"&amp;gt;
      &amp;lt;WrapperTool&amp;gt;tlbimp&amp;lt;/WrapperTool&amp;gt;
      &amp;lt;VersionMinor&amp;gt;0&amp;lt;/VersionMinor&amp;gt;
      &amp;lt;VersionMajor&amp;gt;1&amp;lt;/VersionMajor&amp;gt;
      &amp;lt;Guid&amp;gt;d98a091d-3a0f-4c3e-b36e-61f62068d488&amp;lt;/Guid&amp;gt;
      &amp;lt;Lcid&amp;gt;0&amp;lt;/Lcid&amp;gt;
      &amp;lt;Isolated&amp;gt;false&amp;lt;/Isolated&amp;gt;
      &amp;lt;EmbedInteropTypes&amp;gt;False&amp;lt;/EmbedInteropTypes&amp;gt;
    &amp;lt;/COMReference&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;Reference Include="AdWindows"&amp;gt;
      &amp;lt;HintPath&amp;gt;C:\Program Files\Autodesk\Inventor 2026\Bin\AdWindows.dll&amp;lt;/HintPath&amp;gt;
      &amp;lt;Private&amp;gt;False&amp;lt;/Private&amp;gt;
    &amp;lt;/Reference&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;None Update="NewTab.addin"&amp;gt;
      &amp;lt;CopyToOutputDirectory&amp;gt;PreserveNewest&amp;lt;/CopyToOutputDirectory&amp;gt;
    &amp;lt;/None&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;

  &amp;lt;Target Name="PostBuild" AfterTargets="PostBuildEvent"&amp;gt;
    &amp;lt;Exec Command="xcopy /y /d &amp;amp;quot;$(TargetDir)*.*&amp;amp;quot; &amp;amp;quot;%APPDATA%\Autodesk\Inventor 2026\Addins\&amp;amp;quot;" /&amp;gt;
  &amp;lt;/Target&amp;gt;

&amp;lt;/Project&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2025 12:18:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13831088#M177281</guid>
      <dc:creator>HogueOne</dc:creator>
      <dc:date>2025-09-30T12:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Ribbon Tabs</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13834027#M177312</link>
      <description>&lt;P&gt;hi, this is happening because you do not have anything on that tab, if it is empty it will be not visible...&lt;/P&gt;&lt;P&gt;try to add panel and some button on it.Before you do keep in mind that internal names must be uniqe for all commands, panels and tabs&amp;nbsp; so you cant add 4 tabs with the same internal&amp;nbsp;name, also ribbons doesn't have property named Displayname...&lt;/P&gt;&lt;P&gt;here is modified sub:&lt;/P&gt;&lt;P&gt;ps. do you use actual addin template file ?&lt;/P&gt;&lt;LI-CODE lang="general"&gt;  Private WithEvents m_buttonDef As ButtonDefinition
        Private Sub AddTabToRibbon(ByVal targetRibbon As Ribbon)

            Try
                ' Check if the tab already exists on this specific ribbon.
                Dim existingTab As Inventor.RibbonTab = Nothing
                Try
                    existingTab = targetRibbon.RibbonTabs.Item("id_Tab_OP_" &amp;amp; targetRibbon.InternalName)
                Catch
                    ' Item throws an error if not found, so we catch it and proceed.
                End Try

                If existingTab IsNot Nothing Then
                    Log($"Found existing 'OP' tab on ribbon '{targetRibbon.InternalName}'. No action needed.")
                Else
                    Log($"'OP' tab not found on ribbon '{targetRibbon.InternalName}', attempting to create it now.")
                    Dim newTab As Inventor.RibbonTab = Nothing
                    newTab = targetRibbon.RibbonTabs.Add(
                    DisplayName:="OP",
                    InternalName:="id_Tab_OP_" &amp;amp; targetRibbon.InternalName,
                    ClientId:=AddInClientID)

                    Dim opan As RibbonPanel = newTab.RibbonPanels.Add("OP", "id_Panel_OP_" &amp;amp; targetRibbon.InternalName, AddInClientID)
                    opan.Visible = True
                    newTab.Visible = True
                    Dim controlDefs As ControlDefinitions = m_inventorApplication.CommandManager.ControlDefinitions
                    m_buttonDef = controlDefs.AddButtonDefinition("One", "One_" &amp;amp; targetRibbon.InternalName, CommandTypesEnum.kNonShapeEditCmdType, AddInClientID)
                    opan.CommandControls.AddButton(m_buttonDef)
                    ' IMPORTANT: Add the new tab to our class-level list to keep it alive.
                    m_tabs.Add(newTab)
                    Log($"Successfully created 'OP' tab on ribbon '{targetRibbon.InternalName}'.")
                End If
            Catch ex As Exception
                Log($"!!! ERROR adding tab to ribbon '{targetRibbon.InternalName}': {ex.Message}")
            End Try
        End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 08:06:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13834027#M177312</guid>
      <dc:creator>marcin_otręba</dc:creator>
      <dc:date>2025-10-02T08:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Ribbon Tabs</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13834288#M177313</link>
      <description>&lt;P&gt;I should have replied to myself earlier. I tried adding a panel and a button to my original script because I was suspicious that the core software would remove the new tab if it discovered it empty. I tried almost everything I could think of and it wouldn't work. The last thing I tried was doing a clean uninstall, removing all files, data, registry keys, everything, and reinstalling. After that, I never had an issue. I'm not sure what might have been corrupted about my install. But I had all other addins disabled so it couldn't have been some external influence.&lt;BR /&gt;&lt;BR /&gt;Either way, I appreciate you looking into this. Thank you. Also, I found the template file and I'll be using that as my foundation from now on.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 12:10:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/custom-ribbon-tabs/m-p/13834288#M177313</guid>
      <dc:creator>HogueOne</dc:creator>
      <dc:date>2025-10-02T12:10:17Z</dc:date>
    </item>
  </channel>
</rss>

