using NX Progress Bar in a journal

To all

The macro/journal I am thinking about may take some time to process all the data required. I am currently using
InfoWindow.WriteLine ("Macro is here and is doing that")
at key locations to let the user know what is happening

Is there a way of using the NX Progress Bar to display a % progress status? I know it can be done in Excel using
Application.StatusBar=

Thanks

Regards

JXB

I've not run across any functions that allow you to use/control the progress bar; but that doesn't mean it isn't there.

You can write to the NX status bar using
Dim ufs As UFSession = UFSession.GetUFSession()
ufs.Ui.SetPrompt("text")

Mike

Mike,

thanks for that. Just test the following

'--------------------------
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module StatusBar

Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()

Sub UpdateStatusBarTest()

ufs.Ui.SetPrompt("this is is the prompt %")

End Sub

End Module

'--------------------------
but I get an error msg stating . No main found.
Any idea?

Thanks

Regards

JXB

Thanks
Regards

Just realized that the Sub was not called Main()

'------------------------------------
Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF

Module StatusBar

Dim theSession As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()

Sub Main()

dim i as integer
for i = 1 to 5000
ufs.Ui.SetPrompt("this is is the prompt: "& cstr(i))
next
End Sub
End Module

Thanks
Regards

how about using: Imports system.windows.forms
and use the ProgressBar on a user-defined form?

Can such form be called by a NX sub?

Thanks

JXB

Thanks
Regards

It is possible to use the ProgressBar but you would need to compile the code into a dll file. I use Windows forms for most of my scripts in NX - it takes a bit to get set up but I think it's worth it as it opens up a lot of options.

Mike

Hi Mike
Thanks for the info. I have started looking (gathering info really) on the use of dll as I have not understood yet how to deploy the macros/journals. I have found a bit of stuff on GTAC on this matter but it will take me sometime to understood this (as I have never done it!)

Thanks
Regards