Error Message when Closing Inventor 2017

Error Message when Closing Inventor 2017

Martin-Winkler-Consulting
Advisor Advisor
2,180 Views
4 Replies
Message 1 of 5

Error Message when Closing Inventor 2017

Martin-Winkler-Consulting
Advisor
Advisor

Hi,

i wrote some Tools as AddIn in VB.Net.

With Inventor 2016 they work fine.

In Inventor 2017 i get an error message that a COM object is disconnected from the RCW and could not be used any longer (see attachment).

This Error is initialized in the Closing section of the AddIn after closing InventorApp.

 

 

 

 ''' <summary>
    ''' Do cleanups in it such as releasing COM objects or forcing the GC to Collect when necessary.
    ''' </summary>


    Public Sub Deactivate() Implements ApplicationAddInServer.Deactivate
        ' Add more cleanup work below if necessary, e.g. remove even handlers, flush and close log files, etc.


        ' Release COM objects
        '

        ' Add more FinalReleaseComObject() calls for COM objects you know, e.g.
        'if (comObj != null) Marshal.FinalReleaseComObject(comObj);

        ' Release the COM objects maintained by InventorNetAddinWizard.
        For Each button As InventorButton In AddinGlobal.ButtonList
            If button.ButtonDef IsNot Nothing Then
                Marshal.FinalReleaseComObject(button.ButtonDef)
            End If
        Next

        'Menüleisten schliessen
        If AddinGlobal.RibbonPanelPart IsNot Nothing Then
            Marshal.FinalReleaseComObject(AddinGlobal.RibbonPanelPart)
        End If

        If AddinGlobal.RibbonPanelAssembly IsNot Nothing Then
            Marshal.FinalReleaseComObject(AddinGlobal.RibbonPanelAssembly)
        End If

        If AddinGlobal.RibbonPanelDrawing IsNot Nothing Then
            Marshal.FinalReleaseComObject(AddinGlobal.RibbonPanelDrawing)
        End If

        If AddinGlobal.RibbonPanel3DCSBrowser IsNot Nothing Then
            Marshal.FinalReleaseComObject(AddinGlobal.RibbonPanel3DCSBrowser)
        End If


        'Closing Inventor
        If AddinGlobal.InventorApp IsNot Nothing Then
            Marshal.FinalReleaseComObject(AddinGlobal.InventorApp)
        End If

 

      End Sub

 

 

Any idea how i can recognize which COM Object creates the error message?

When i have a look at the debugger there is no COM Object openend at this time.

 

Best Regards Martin

 

 

Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

0 Likes
Accepted solutions (1)
2,181 Views
4 Replies
Replies (4)
Message 2 of 5

flora_fang
Autodesk
Autodesk
Accepted solution

From the error dialog, it seems related with Guided Tutorial addin, Would you please unload the Guided Tutorial nd see the problem still reproduce?

AddIn.png

 



Flora Fang
Flora.Fang@autodesk.com
Software Quality Assurance
Design & Manufacturing
Autodesk, Inc.

Message 3 of 5

Martin-Winkler-Consulting
Advisor
Advisor

Hi flora,

thanks for your reply. You are right. I tested it without the interactive tutorial and the error was gone away.

But what can i do? I do not want to deactivate interactive tutorial !?

 

 

Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

Message 4 of 5

GeorgK
Advisor
Advisor

Hello @flora_fang,

 

I get the same error. Is this error confirmed and got a ticket number?

 

Thanks

 

Georg

 

0 Likes
Message 5 of 5

Martin-Winkler-Consulting
Advisor
Advisor

Hi GeorgK,

look here for a temporarily solution:

 

 

@Anonymous admin

Perhaps it is useful to make one Thread from both

 

 

Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature