VBA Events get disconnected after code crash

VBA Events get disconnected after code crash

Majjek
Advocate Advocate
606 Views
4 Replies
Message 1 of 5

VBA Events get disconnected after code crash

Majjek
Advocate
Advocate

Hello,

 

I'm busy with some events in VBA.

I've created an EventClass with 2 subs Connect and Disconnect to activate the Events.

There is 1 OnSaveDocument event present and it works perfect.

 

But when I'm working on other code, and during debugging it crashes, the Eventclass seems to get disconnected.

That means I have to reconnect to the EventClass again each time my code crashes.

 

How can I prevent this from happening?

 

Thanks in advance.

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

bradeneuropeArthur
Mentor
Mentor
Accepted solution

By creating an add-in with ie VB.net.

 

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

Message 3 of 5

chandra.shekar.g
Autodesk Support
Autodesk Support

@Majjek ,

 

To test crash, please share VBA code and make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 4 of 5

Majjek
Advocate
Advocate

Thanks for the answers guys.

I knew this would be one of the answers I'd receive Smiley Tongue.

Because I'm not very familiar with VB.Net and VS, I thought it would took me some time before I could create an add-in with events.

But a little search on the forums showed me that it wasn't that hard.

Message 5 of 5

bradeneuropeArthur
Mentor
Mentor

Fully agree 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