Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

add-in loads under 2011 but it doesn't under 2010

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
321 Views, 2 Replies

add-in loads under 2011 but it doesn't under 2010

I've made an add-in for the ribbon bar and under 2011 (32 and 64bit) it loads without an problems. 

I gave the same add-in to some people with Inventor 2010, but it doesn't load. Nothing appears in the add-in manager.

 

Is there a difference between 2010 an 2011 for add-in creation? I thought they have both a ribbon bar so I can use the same add-in for both.

 

Wim

 

Below my code for the COM registration.

 

#Region "COM Registration"

        ' Registers this class as an AddIn for Inventor.
        ' This function is called when the assembly is registered for COM.
        <ComRegisterFunctionAttribute()> _
        Public Shared Sub Register(ByVal t As Type)

            Dim clssRoot As RegistryKey = Registry.ClassesRoot
            Dim clsid As RegistryKey = Nothing
            Dim subKey As RegistryKey = Nothing

            Try
                clsid = clssRoot.CreateSubKey("CLSID\" + AddInGuid(t))
                clsid.SetValue(Nothing, "InventorMatProp")
                subKey = clsid.CreateSubKey("Implemented Categories\{39AD2B5C-7A29-11D6-8E0A-0010B541CAA8}")
                subKey.Close()

                subKey = clsid.CreateSubKey("Settings")
                subKey.SetValue("AddInType", "Standard")
                subKey.SetValue("LoadOnStartUp", "1")

                'subKey.SetValue("SupportedSoftwareVersionLessThan", "15")
                subKey.SetValue("SupportedSoftwareVersionGreaterThan", "13..") '(Inventor 2011 = Version 15)
                'subKey.SetValue("SupportedSoftwareVersionEqualTo", "15..")
                'subKey.SetValue("SupportedSoftwareVersionNotEqualTo", "")
                'subKey.SetValue("Hidden", "0")
                'subKey.SetValue("UserUnloadable", "1")
                subKey.SetValue("Version", 0)
                subKey.Close()

                subKey = clsid.CreateSubKey("Description")
                subKey.SetValue(Nothing, "Properties, Material, Color and Project manager")

            Catch ex As Exception
                System.Diagnostics.Trace.Assert(False)
            Finally
                If Not subKey Is Nothing Then subKey.Close()
                If Not clsid Is Nothing Then clsid.Close()
                If Not clssRoot Is Nothing Then clssRoot.Close()
            End Try

        End Sub

 

2 REPLIES 2
Message 2 of 3
matt_jlt
in reply to: Anonymous

If you have targeted new commands in 2011 that 2010 does not have it will not work, I havn't checked if they both have the same structure to the ribbons etc. Did you remember to change what version it is targeting in the Information?

I think its the assembly module thingy. There is a field where you set the target version of inventor. If it is set to target 2011 and above only ou will need to change it so it targets 2010. I  dont have visual studio in front of me so i can't remember everything exactly but i hope it helps. Also try changing which version of the inventor interop you are targeting. might work.

Message 3 of 3
Anonymous
in reply to: Anonymous

You need to check the Command Category, the Internal Name of button, maybe you have a same internal name of button already.

Hope that you can find the solution soon!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report