Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Keyboard shortcuts in Journal files

Status
Not open for further replies.

eroe

Mechanical
Jul 29, 2009
37
0
0
US
Does anyone know if it is possible to execute keyboard strokes in a journal file?

This may seem pointless, but I am trying to solve the never ending problem of switching from Drafting to Modeling using a journal file (at least I have not yet found a way, even though I have found that it is possible to switch from Modeling to Drafting through a journal file). Right now, I have the letter 'm' on the keyboard set up to switch to modeling, and I would like to have a journal file that can execute the 'm' keystroke. I am using NX6.

Any thoughts are welcome, I always start a thread with a specific goal, but after picking people's brains on this forum, I usually end up with an altered path that I would have never thought of on my own..

Thanks for the help!

Eric Roe
Electro-Mechanical Engineer
Airfloat LLC
 
Replies continue below

Recommended for you

What version of NX are you running?
I ask because in NX 8 they added an option to switch between modeling and drafting in a journal. However, in most cases it isn't necessary, unless the point of your journal is to change applications for the user.

If you are running 7.5 or lower, you might try the sendkeys command. I'm not sure if that would work, but it is worth a try.

www.nxjournaling.com
 
Hey couski,

I am running NX6..

I will give the sendkeys command a try tomorrow, thanks for the input!

Eric Roe
Electro-Mechanical Engineer
Airfloat LLC
 
Couski,

How do I set the Sendkeys command up to work in NX? I guess my question is how do I declare it? Sorry I am still a little new to VB..

Thanks again,
Eric

Eric Roe
Electro-Mechanical Engineer
Airfloat LLC
 
In the "imports" section of your journal (at the top) add the line:
Imports System.Windows.Forms

Then in your code you can simply use:
Code:
Sendkeys.Send("keystrokes")

for special keystrokes, refer to the previous link.

www.nxjournaling.com
 
Status
Not open for further replies.
Back
Top