Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SendKeys or Keystrokes Using iLogic

7 REPLIES 7
Reply
Message 1 of 8
mehatfie
930 Views, 7 Replies

SendKeys or Keystrokes Using iLogic

Hi All,

 

I've looked around and done some research on this and it seems possible just I can't figure out how to do it.

 

I'm looking to send keystrokes programmically using iLogic as if the keys were actually being pressed. I just want to send a simple set of keys like "QQ".

 

Does anybody know how I would do this through iLogic? Or trigger a code that would allow me to send these keys.

 

Thanks

Mitch

7 REPLIES 7
Message 2 of 8
skyngu
in reply to: mehatfie

sendkey is a bad coding practice. dont use it unless you have to.

Autodesk Inventor Professional 2019
Message 3 of 8
mehatfie
in reply to: skyngu

Thanls for the tip,

 

I'm new to programming though and have gone through the tutorials and the "My First Plug In" Guide but still have trouble understanding VB

 

I'm trying to start up the dialog box connected to a custom Add-In we use. This can normally be accessed by pressing the button in the "Add-Ins" Tab

 

OR

 

There is a short cut which can be customized through inventor for a keyboard shortcut (ie. "QQ")

 

I'm not sure how to start up the dialog box by accessing it through code. But I figure I can make the keyboard press the "QQ" a little easier

 

Again, Thanks for the help

Mitch

Message 4 of 8
mehatfie
in reply to: mehatfie

Even if it is an improper method of programming, is there anyone who can tell me how to do this

Message 5 of 8
skyngu
in reply to: mehatfie

under controldefinition-defaultshortcut or overrideshortcut

you can set the default shortcut assigned to the command. I use "u" to hide or open browser when I need "real" full screen. it is a small vba macro. But it should work in vb.net too.

 

good luck

Autodesk Inventor Professional 2019
Message 6 of 8
mehatfie
in reply to: mehatfie

Hi jcneal,

Thank you for responding again, if I'm understanding correctly, what your telling me is how to change the hotkey used for a command. This I know how to do or can figure out, but I don't know how to, I guess you would say, programmically simulate as if a key was being pushed. Through research I found that it might be this sendkey, but I'm not sure how to program it to press, say, this "u" shortcut you have through a rule.

Thanks again
Mitch
Message 7 of 8
skyngu
in reply to: mehatfie

hmm, my bad. i misunderstand your question. I mean physically press a key, not "programme" to press a key.

 

sorry i dont know how to do it.

 

just out of curious, why do you need to press keys by programme instead of purely programming?

Autodesk Inventor Professional 2019
Message 8 of 8
mehatfie
in reply to: skyngu

I've done some research on how to try and access the button through programming. But I can't seem to find how to do so. What I found was that I need to add reference to a .dll (which I found) but also the dialog box. I did not find the dialog box as it was installed by an outside source and I can't seem to locate it.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report