Jump to content

Progress Dialog


twk

Recommended Posts

SDK Only as far as I know.

 

I used to use the Message command for this, but a few versions ago it stopped displaying until the script run completed. I think it was going to be fixed, but I have not tried in VW 2020.

 

The AlertInform dialog box would be good for this as the Minor Alert boolean makes it show at the bottom edge of the drawing window where the rendering progress indicator sits, but only for the first run. After the first run it automatically is (or at least was in VW2017) it automatically defaulted to a full dialog box.

 

I hope one of these might work for you.

Link to comment

Ahh thats a shame, I shall explore some external python libraries.. WxPython, TKinter etc.

 

On 3/1/2020 at 6:05 AM, Pat Stanford said:

After the first run it automatically is (or at least was in VW2017) it automatically defaulted to a full dialog box.

This still happens sadly..

Edited by twk
Link to comment

Hello

 

I am not sure, if have understood correctly your question. However I can say the following:

  • the progress dialog can be displayed without the vs.ProgressDlgStart() and terminated without the vs.ProgressDlgEnd() call.
  • without calling vs.ProgressDlgClose() the dialog window stays open until the script terminates.
  • vs.ProgressYield() has to have a numeric parameter vs.ProgressYield(1), otherwise pyhton errors are thrown.
  • vs.ProgressYield(int) has to be called otherwise the other messages like vs.ProgressDlgSetMeter(message) are not refreshed on the dialog window.
def messagePtest3():

	
	selCount = 10

	def DoTheWork():
	#	vs.ProgressDlgStart(100,selCount)
		for i in range(selCount+1):
			vs.ProgressDlgYield(1)
			vs.ProgressDlgSetMeter(str(i))
			vs.Wait( 1 )	#well, we work by waiting

	
	
	vs.ProgressDlgOpen( "I'm about to do some work", False )
	vs.ProgressDlgSetMeter("") # this resets previous values, if vs.ProgressDlgStart is not callded
	DoTheWork()
	# vs.ProgressDlgEnd()
    # vs.ProgressDlgClose() # if close is not called, the dialog stays open until the script terminates
	
	

 

best regards,

 

relume

 

 

Edited by relume
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...