Showing results for 
Search instead for 
Do you mean 
Reply

spell checker

Hi,

in the UGOPEN folder (C:\.....\NX 8.0\UGOPEN\SampleNXOpenApplications\.NET) there is a spellcheck example.

Can someone create the .dll ?

 

Thank you...

Using NX 11 / RuleDesigner PDM

11 REPLIES

Re: spell checker

Yes, I have built the DLL.

 

I also ran it (in NX10). At first I thought it was hung. But I found that the Word spell check dialog gets hidden behind other windows. You have to find it and click on something to let it proceed. In the end, it successfully corrected the spelling errors.

 

Did you have some problem?

 

Did you add a reference to Microsoft.Office.Interop.Word.dll (as mentioned in the ReadMe file)?

山田
yamada

Re: spell checker

Hi Yamada,
can you resolve the problem of the spell check dialog gets hidden ?
If resolved, can you share the dll ?
Thank you...

Using NX 11 / RuleDesigner PDM

Re: spell checker

Sorry, but I don't know how to solve the window hiding problem. Maybe someone else here does.

山田
yamada

Re: spell checker

 

I was hoping that there would be a property on the Word dialog that could be used to force it to the top, but I could not find anything like that.  I added three lines to the WordSpellChecker.vb file.

 

This one, near the top:

 

Imports NXOpen.UF

 

And these two in the Try block, right above "dlg.Show()"

 

    Dim ufs As UFSession = UFSession.GetUFSession()
    ufs.Ui.SetStatus("SPELL-CHECK DIALOG IS BEHIND NX.  USE ALT-TAB")

 

This does not fix the problem, but it might prevent your users from rebooting because they thought NX was frozen.

Re: spell checker

[ Edited ]

I've had similar problems trying to use Java SWT dialogs inside NX and the trick there was to set the parent window of the dialog.

I've not spent much time trying to solve this, but a quick Google found this thread that might be useful: ArcMap SpellChecker

This example finds the window for the parent using FindWindow() that takes a string as the window name. I've played with that some years ago and seem to recall it was quite difficult to get the NX window this way (somwthing to do with the window title changing to reflect the current part name). As an alternative, you might be able to use the wrapper for the old UF_UI_get_default_parent() to get the NX window and pass that to SetParent().

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | C# | KF
Production: NX8.5.3.3 MP11 64bit Testing: NX9.0.2.5

Re: spell checker


SteveLabout wrote:

 

I was hoping that there would be a property on the Word dialog that could be used to force it to the top, but I could not find anything like that.  I added three lines to the WordSpellChecker.vb file.

 

This one, near the top:

 

Imports NXOpen.UF

 

And these two in the Try block, right above "dlg.Show()"

 

    Dim ufs As UFSession = UFSession.GetUFSession()
    ufs.Ui.SetStatus("SPELL-CHECK DIALOG IS BEHIND NX.  USE ALT-TAB")

 

This does not fix the problem, but it might prevent your users from rebooting because they thought NX was frozen.


I'm not a programmer, but on google I've found this SendMessage(FOREGROUNDWINDOW).

Can be used ?

Thank you...

Using NX 11 / RuleDesigner PDM

Re: spell checker


Yamada wrote:

Sorry, but I don't know how to solve the window hiding problem. Maybe someone else here does.


To show in front off the word process, you have to find the handle of the window by SetForegroundWindow()

See here:

http://www.vbforums.com/showthread.php?671719-RESOLVED-SetForeGroundWindow

https://social.msdn.microsoft.com/Forums/en-US/fd9215cf-0893-4c61-886c-5d22fa7c2055/problem-activati...

To find the handle of the window, you can use FindWindow().
Or you can scroll the vb.net "Process" library in the task manager, find winword.exe and give the handle hwnd from the process.

http://bytes.com/topic/visual-basic-net/answers/498531-bring-already-running-app-front

Thank you...

Using NX 11 / RuleDesigner PDM

Re: spell checker

Is this .dll file still available. If so can someone provide me the location or contact me. I appreciate it.

Re: spell checker

Is this any way to get this .dll file or something which will highlight and correct spelling?