Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

journal listing window sleep than close issue

Status
Not open for further replies.

multicaduser

Industrial
Jan 29, 2013
261
In writing a journal I would like to write some lines to the listing window, display if for a number of seconds, then close the window. This is the code I'm using which I found on NXJournaling.com (an awesome web site).

Threading.Thread.Sleep(2000)
lw.CloseWindow()

The lines writing to the listing window are just above this code, however, instead of the writing the lines to the listing window then sleeping it sleeps first then writes the lines and closes the listing window.

Am I using this code wrong or is there something else being overlooked.

NX 12.0.1.7 Windows 10
 
Replies continue below

Recommended for you

The sleep command will stop all processing in your code for the given amount of time. Writing something to the info window then automatically closing it after a couple of seconds seems like it may aggravate your users. If you truly want to do this, I'd suggest calling the .UpdateListingWindow method before calling the sleep method. This should force the window to update.

www.nxjournaling.com
 
Thanks, works like a charm. You're right about the interface aggravation, but it's good to know this answer anyway. Just finishing up my first hand rolled journal (no, I never learned vb until now). By hand rolled I mean stolen from many sources and tweaked. Thanks again for the help.

NX 12.0.1.7 Windows 10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor