capture addin events

capture addin events

omartin
Advocate Advocate
1,169 Views
19 Replies
Message 1 of 20

capture addin events

omartin
Advocate
Advocate

Is it possible to capture when an addin starts / stops? Or when an addin starts / stops a specific command?

 

I have been looking in the event watcher and it seems like the transactionEvents only triggers a reaction.

ex: on commit, property edit, kbefore/after.

 

I want check for what addin caused the event, and if it is from a specific addin, do something once the event is complete.

 

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
1,170 Views
19 Replies
Replies (19)
Message 2 of 20

Jef_E
Collaborator
Collaborator

What event are you willing to monitor ?



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
0 Likes
Message 3 of 20

bradeneuropeArthur
Mentor
Mentor

@omartin

Hi,

 

Yes:

 

 Public Sub Activate(ByVal addInSiteObject As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate
'YOUR CODE HERE LIKE MESSAGEBOX
end sub
Public Sub Deactivate() Implements Inventor.ApplicationAddInServer.Deactivate
'YOUR CODE HERE LIKE MESSAGEBOX
end sub

 

Private Sub m_SmallButton_OnExecute(Context As Inventor.NameValueMap) Handles m_LargeButton.OnExecute, m_SmallButton.OnExecute
'YOUR CODE HERE LIKE MESSAGEBOX
end sub

@omartin 

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 20

omartin
Advocate
Advocate

@Jef_E I'm specifically looking at when an iproperty gets updated. im trying to find which addin caused the update.

 

Also, the addin I'm trying to capture is just a third party addin not created by me.

 

@bradeneuropeArthur those code snippets are assuming, im trying to capture events in my own addin correct?

in general that is the idea I am looking for. if I could use those functions I don't know how to get the addInSiteObject to pass in.

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 5 of 20

bradeneuropeArthur
Mentor
Mentor

Hi,

MAKE THE REFERENCES AS IN THE PICTURE.

Put the following line in your add in:

 

Implements Inventor.ApplicationAddInServer#####STAND HERE AND PRESS ENTER

THE REST OF THE CODE IS AUTOAMICALLY ADDED.

 implements.PNG

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 6 of 20

omartin
Advocate
Advocate

Hi; those code snippits are generated in my app already. The problem is adding code here will only trigger with respect to the current addin it is written in.

 

The addin that I am trying to capture is a third party addin, not written by me, I do I have access to it to write any code in it.

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 7 of 20

bradeneuropeArthur
Mentor
Mentor
You do or you don't have write acces?

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 8 of 20

omartin
Advocate
Advocate

ops... that was a typo I don't have any acess to the other program...

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 9 of 20

bradeneuropeArthur
Mentor
Mentor
You can reference the dll and use the events with that.....

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 10 of 20

omartin
Advocate
Advocate

I have been playing around with that here is what I did:

 

Dim thidParty As thirdparty.addin

I = thisapp.applicationaddins.count For i = 1 To I If thisApp.ApplicationAddIns(i).DisplayName = "addin" Then thirdparty= thisApp.ApplicationAddIns.ItemById(thisApp.ApplicationAddIns(i).ClientId) Exit For End If Next

 

I get no compile errors, but not sure how to watch for events from here.

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 11 of 20

bradeneuropeArthur
Mentor
Mentor
You need to make a reference to the dll. Via the properties in vb.net or Vba. or are you using i logic

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 12 of 20

omartin
Advocate
Advocate

im using vb .net. I did add the dll to the reference manager.

 

After creating the variable intelli-sense does show some commands related to the program, such as activate / deactivate.

but no commands that seem specific to what im looking for....another problem is this add-on has a user interface..so the command is not started from the inventor interface directly

 

I also tried to use the withevents, but no events show up in the second dropdown at the top of the vb interface.

 

I guess its not possible if the thirparty app has no public events or public commands...

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 13 of 20

bradeneuropeArthur
Mentor
Mentor
Your right they are declared as private then.
So not possible derictly.

Can you use the userinputevent on activate command?

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 14 of 20

omartin
Advocate
Advocate

nop I get no reaction, but if I use other commands such as extrude or zoom I get a reaction.

 

I used this to assign the userinputevent variable, thisApp.CommandManager.UserInputEvents

 

If I use the transactionevents.oncommit I get a reaction, "edit property". but if I just manually edit the property I get the same reaction.

if I can somehow get the addin name from the transactionObject this would be the closest we can get it.

 

 

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 15 of 20

bradeneuropeArthur
Mentor
Mentor
But the on activate command is not showing you the command name, with msgbox (commandname)?

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 16 of 20

omartin
Advocate
Advocate

nope its not getting triggered, I set a break point on it and it skips over it. even if I run the addin that I created it doesn't cause a reaction.

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 17 of 20

bradeneuropeArthur
Mentor
Mentor
Can I ask what add in you are trying to access?

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 18 of 20

omartin
Advocate
Advocate

ahhh...I would rather leave out the name but it was made for our company from some independents... its nothing special just updates some iProperties.

 

Was my reply Helpful ? send a Kudos or accept as solution
0 Likes
Message 19 of 20

bradeneuropeArthur
Mentor
Mentor
I understand..
Nothing I can check together with you 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

0 Likes
Message 20 of 20

bradeneuropeArthur
Mentor
Mentor
I have an idea but I would also leave this outside the forum. How could we proceed? Any idea?

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