Inventor Customization

Reply
Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 1 of 8 (261 Views)

SendKeys or Keystrokes Using iLogic

261 Views, 7 Replies
02-21-2012 07:05 AM

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

Valued Mentor
jcneal
Posts: 320
Registered: ‎04-10-2010
Message 2 of 8 (247 Views)

Re: SendKeys or Keystrokes Using iLogic

02-22-2012 10:04 AM in reply to: mehatfie

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

Autodesk Inventor Professional 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010
Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 3 of 8 (245 Views)

Re: SendKeys or Keystrokes Using iLogic

02-22-2012 10:09 AM in reply to: jcneal

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

Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 4 of 8 (217 Views)

Re: SendKeys or Keystrokes Using iLogic

02-24-2012 11:26 AM in reply to: mehatfie

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

Valued Mentor
jcneal
Posts: 320
Registered: ‎04-10-2010
Message 5 of 8 (205 Views)

Re: SendKeys or Keystrokes Using iLogic

02-24-2012 06:10 PM 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 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010
Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 6 of 8 (188 Views)

Re: SendKeys or Keystrokes Using iLogic

02-26-2012 09:55 AM 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
Valued Mentor
jcneal
Posts: 320
Registered: ‎04-10-2010
Message 7 of 8 (183 Views)

Re: SendKeys or Keystrokes Using iLogic

02-26-2012 02:57 PM 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 2014
Autodesk Product Design Suite Standard 2013
Microsoft Office 2007 & 2013
Windows 7 64bit
Synergis Adept 2013
Visual Studio Express 2010
Mentor
mehatfie
Posts: 163
Registered: ‎02-10-2012
Message 8 of 8 (175 Views)

Re: SendKeys or Keystrokes Using iLogic

02-27-2012 05:43 AM in reply to: jcneal

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.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube