Inventor running second instance of my addin

Inventor running second instance of my addin

Garrett.Sudicky
Explorer Explorer
730 Views
4 Replies
Message 1 of 5

Inventor running second instance of my addin

Garrett.Sudicky
Explorer
Explorer

I've created an addin for inventor 2015. Everything works perfectly, except when I type a space in a textbox on my form it triggers Inventor to run the last command again which opens another instance of my addin. Is fixing this as simple as a setting, or is there a way to block inventor hotkeys while my addin is open? Tabbing through the controls on the form also isnt working, could this be related to inventor accepting the tab before my addin?

AIP 2015
Windows 7 x64
Dell Precision T7400 Intel(R) Core(TM) i7-4790K CPU @ 4.00 GHz (4 CPU's), 32GB RAM, NVIDIA Quadro K2200
0 Likes
Accepted solutions (1)
731 Views
4 Replies
Replies (4)
Message 2 of 5

Curtis_Waguespack
Consultant
Consultant

Hi Garrett.Sudicky,

 

Hopefully I'm not leading you astray here (if I am someone can correct me), but I think what you might be after, might be found by right clicking on your solution and choosing Properties, and then setting the Startup Application settings as indicated.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

Addin StartUp.PNG

EESignature

0 Likes
Message 3 of 5

Garrett.Sudicky
Explorer
Explorer

Thanks, I tried this but my addin failed to load. I have multiple buttons on my ribbon panel, each one opening a different form. I could be wrong but I don't believe that will work in my case.    

 

These are my current settings that I have been using.

 settings.PNG

AIP 2015
Windows 7 x64
Dell Precision T7400 Intel(R) Core(TM) i7-4790K CPU @ 4.00 GHz (4 CPU's), 32GB RAM, NVIDIA Quadro K2200
0 Likes
Message 4 of 5

Curtis_Waguespack
Consultant
Consultant
Accepted solution
0 Likes
Message 5 of 5

Garrett.Sudicky
Explorer
Explorer

Thanks Curtis for spending and effort to look for a solution! I used this chunk of code when my form loaded and then set it to false when it closed and it worked perfectly. Didn't happen to fix the tabbing through textboxes issue im having. Was hoping they were connected but thanks a lot that was driving me nuts for a couple weeks now.

 

 

<code>

Dim _invApp As Inventor.Application
_invApp = System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application")
_invApp.UserInterfaceManager.UserInteractionDisabled = True 

<code>

AIP 2015
Windows 7 x64
Dell Precision T7400 Intel(R) Core(TM) i7-4790K CPU @ 4.00 GHz (4 CPU's), 32GB RAM, NVIDIA Quadro K2200
0 Likes