Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

VB.Net & Interaction Events not working in 2018

Anonymous

VB.Net & Interaction Events not working in 2018

Anonymous
Not applicable

Hi All,

I've ported some vb.net code over to 2018 and it has stopped firing the select event, did something change that I have missed or anyone else in the same boat?

It looks like it starts the event, I get RMB menu changes etc. but it's not able to make a selection. Gone through some trial and error trouble shooting disabling selection filtering, single selection etc. but now pretty stuck.

 

Any Ideas?

 

Phil 

0 Likes
Reply
529 Views
2 Replies
Replies (2)

BrianEkins
Mentor
Mentor

I'm sure that Interaction events are still working for apps like Tube & Pipe, and Frame Generator would also be broken.  My guess is that you've created a new project and have forgotten to change the "Embed Interop Types" setting for the "Autodesk.Inventor.Interop", as shown below.  Make sure that's set to False and then try your program again.

 Embed.png

 

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

Anonymous
Not applicable

Hi Brian,

Embed is set to false. I've literally just managed to get it working again by adding an InventorApplication.UserInterfaceManager.DoEvents() while loop just after the interaction event is triggered, and is stopped by the object selected event trigger.

 

I've stepped through last years code and it runs fine without going into the DoEvents loop which seems totally bizarre (but then I'm fixing someone's code with no prior visual studio, .net or Inv API experience, I've not got a clue as to what should and shouldn't happen)

 

The setting for copy local for Autodesk.Inventor.Interop is also set to false in my solution.

 

Thanks and Regards

Phil

0 Likes