- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
Solved! Go to Solution.