BUG in 2022? ApplicationEvents oAppEvents_OnReady doesnt fire

BUG in 2022? ApplicationEvents oAppEvents_OnReady doesnt fire

Frederik_Mussler
Contributor Contributor
1,642 Views
11 Replies
Message 1 of 12

BUG in 2022? ApplicationEvents oAppEvents_OnReady doesnt fire

Frederik_Mussler
Contributor
Contributor

Hey guys,

 

i just upgraded from Inventor 2019 to Inventor 2022. I just noticed that in my addin an InventorEvent is not fired anymore. Does anyone have the same issue. Simple Expample when i start Inventor i expect the "Ready" Messagebox to show up, but nothing happens. If i close Inventor, the MessageBox "Close" appears. So is there a bug in the new version or what is wrong?

 

 

Public Class StandardAddInServer
Implements Inventor.ApplicationAddInServer

' Inventor application object.
Private m_inventorApplication As Inventor.Application
Private WithEvents oAppEvents As ApplicationEvents

Private Sub oAppEvents_OnReady(BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles oAppEvents.OnReady
            MsgBox("READY")
End Sub

Private Sub oAppEvents_OnQuit(BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles oAppEvents.OnQuit
            MsgBox("QUIT")
End Sub

 

 

 

 

0 Likes
Accepted solutions (1)
1,643 Views
11 Replies
Replies (11)
Message 2 of 12

Ralf_Krieg
Advisor
Advisor

Hello

 

Can't test with Inventor 2022 right now, but just for the sake of clarity, your Addin is sure loaded at  Inventor start? What type of load behaviour is in your .addin file?


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 12

bradeneuropeArthur
Mentor
Mentor

Where is your oappevent declared?

Like :

Oappevent =inv.applicationevents

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 4 of 12

bradeneuropeArthur
Mentor
Mentor
Private m_inventorApplication As Inventor.Application Private WithEvents oAppEvents As ApplicationEvents
oAppEvents =m_inventorApplication.ApplicationEvents
Private m_inventorApplication As Inventor.Application
Private WithEvents oAppEvents As ApplicationEvents

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 12

Ralf_Krieg
Advisor
Advisor

Hello

 

Tested it now with 2022 and the event is fired.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 6 of 12

bradeneuropeArthur
Mentor
Mentor

Please upload the complete code to see where the declarations are.

I am missing things!

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 12

Frederik_Mussler
Contributor
Contributor

Sry, my posted code was not complete. Since i'm talking about a plugin that worked perfectly in 2019, i have not changed a line of code. So just for testing i startet a new blank addin with the SDK Template for Visual Studio.

 

Namespace InventorAddIn1
    <ProgIdAttribute("InventorAddIn1.StandardAddInServer"), _
    GuidAttribute("79167e06-f668-480d-8f20-ddb230a4da37")> _
    Public Class StandardAddInServer
        Implements Inventor.ApplicationAddInServer
        Private WithEvents m_InEv As ApplicationEvents
        Private WithEvents m_uiEvents As UserInterfaceEvents
        'Private WithEvents m_sampleButton As ButtonDefinition

#Region "ApplicationAddInServer Members"

        ' This method is called by Inventor when it loads the AddIn. The AddInSiteObject provides access  
        ' to the Inventor Application object. The FirstTime flag indicates if the AddIn is loaded for
        ' the first time. However, with the introduction of the ribbon this argument is always true.
        Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate
            ' Initialize AddIn members.
            g_inventorApplication = addInSiteObject.Application

            ' Connect to the user-interface events to handle a ribbon reset.
            m_uiEvents = g_inventorApplication.UserInterfaceManager.UserInterfaceEvents
            m_InEv = g_inventorApplication.ApplicationEvents

            ' Add to the user interface, if it's the first time.
            If firstTime Then
                AddToUserInterface()
            End If
        End Sub

        Private Sub m_InEv_OnReady(BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles m_InEv.OnReady
            MsgBox("INVENTOR READY EVENT")
        End Sub

        Private Sub m_InEv_OnQuit(BeforeOrAfter As EventTimingEnum, Context As NameValueMap, ByRef HandlingCode As HandlingCodeEnum) Handles m_InEv.OnQuit
            MsgBox("INVENTOR QUIT EVENT")
        End Sub

 

Quit Event Works, Ready not. 

0 Likes
Message 8 of 12

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Hi,

 

Are there other addins that use the ApplicationEvents?

What happens if you unload all Add-ins also from starting automatic.

and start Inventor new with only your add in loaded.

does it work than?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 9 of 12

Frederik_Mussler
Contributor
Contributor

Hi, 

 

good idea, i started inventor with all addins unloaded except my addin, and so the Event was fired. So yes indeed it works than.

So enabling back the build in addins from inventor i just came across the Autodesk.Feedback.Inventor.addin

If i disable this addin everything works fine, if the feedback addin is enabled, i have the problem again with the event not getting fired.

 

Inventor Product Feedback Add In | Search | Autodesk Knowledge Network

 

So due to it is not an important addin, i can just let it disabled, maybe others can reproduce this behaviour and we can add this as a bug?

0 Likes
Message 10 of 12

bradeneuropeArthur
Mentor
Mentor

So partly solved!

 

@johnsonshiue 

 

Could you please take a look at this with the development team?

 

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 11 of 12

Frederik_Mussler
Contributor
Contributor
Yes thank you 🙂
0 Likes
Message 12 of 12

m.buehler1
Contributor
Contributor

Some news:

The issue of not working event ApplicationEvents.OnReady due loaded Feedback Add-On appears again in Inventor 2025 (2025.2 of October 2024)

I opened a support ticket - Confirmed, it is a bug (related to outdated NLog version 4.0). Autodesk will fix in future version.

0 Likes