I have a external program I have been tinkering with that is basically a floating keyboard to enter common notes, etc. It is pretty simple and uses sendkeys to send the strings to wherever the cursor currently is(Notepad, NX, anywhere...). I recently was playing with adding a spell check on to this same external program. It selects all of the text wherever the cursor currently is and puts it in a text box on the external program through the clipboard. There it performs the spell check. The issue I have is that when the spelling gets corrected, the nx window loses focus. If the user doesn't click back in the nx note editor, the corrected spelling is just sent nowhere.
Is there a way for an external program to ask the user to select a nx annotation, take its string into the external program to spell check, and then send the string back to NX?
Accessing NX from External program
Yes. You can do this with "remoting". Essentially your NX session launches a listener process, and your executable then sends a message to the NX session to get its attention. Then you can execute commands in your .exe that will run in the NX session. There are example remoting programs posted on the GTAC solution center site.
Accessing NX from PowerShell
Have either of you used a Windows API such as PowerShell to interact with NX and other applications? I have always been very interested in linking NX and other programs.
DHuskic
Nx 9 VB
re: PowerShell
I have not accessed NX through PowerShell or any other Windows API, but it does sound like an interesting prospect. Hopefully, someone with experience in this area will post some tips.