0 Replies Latest reply on Apr 5, 2016 2:02 AM by roberto gennari

    Problem! Toolbar location reset every time!

    roberto gennari

      Hallo,

      I have an addin where I built 5 toolbar.

      The SolidWorks version where I installed  the add-in  is 2016 sp2 (in other versions have not tried)

      My problem is that each time you start the PC, the Toolbars does not keep the location, but all lead to the right side.

      I tried to follow the suggestion of the post

      CommandManager Toolbar not remembering state

      but nothing changes.

       

      Have you any solution for this problem?

      Thanks to everybody

       

      Roberto

       

      This is my code:

         Public Sub RemoveCommandMgr()

              Try

                  iBmp.Dispose()

                 iCmdMgr.RemoveCommandGroup2(mainCmdGroupID, True)

                 iCmdMgr.RemoveFlyoutGroup(flyoutGroupID)

              Catch e As Exception

               End Try

          End Sub

       

      In the Addin code:

       

              cmdGroup = iCmdMgr.CreateCommandGroup2(mainCmdGroupID, "&MyAddin", ToolTip, "", -1, ignorePrevious, cmdGroupErr)

              If cmdGroup Is Nothing Or thisAssembly Is Nothing Then

                         Throw New NullReferenceException()

              End If