.NET

.NET

Reply
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 21 of 27 (107 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

01-18-2007 04:34 PM in reply to: newArch
For those using 2007 it is in the .NET API.

Here is a VB.NET Example.

Dim objProgress As ProgressMeter = New ProgressMeter
objProgress.SetLimit(10000000)
Dim intCount As Integer = 0
objProgress.Start()
Do Until intCount = 10000000
objProgress.MeterProgress()
intCount += 1
Loop
objProgress.Stop()
*Ron Hanson
Message 22 of 27 (108 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-29-2007 12:18 PM in reply to: newArch
Very interesting thread. I have a question about the code below. What's the
purpose of objProgress.SetLimit(10000000) when the do loop is setting the
limit?

wrote in message news:5456938@discussion.autodesk.com...
For those using 2007 it is in the .NET API.

Here is a VB.NET Example.

Dim objProgress As ProgressMeter = New ProgressMeter
objProgress.SetLimit(10000000)
Dim intCount As Integer = 0
objProgress.Start()
Do Until intCount = 10000000
objProgress.MeterProgress()
intCount += 1
Loop
objProgress.Stop()
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 23 of 27 (108 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-29-2007 03:54 PM in reply to: newArch
The loop sets the limit of of how many times the loop meters (increments) the progress control. The SetLimit property gives the maximum value for the progress control so that it can calculate that if it has been incremented 5000000 times it is at 50% progress.

A good example is if you wanted to have progress while iterating a selection set with a for next loop. You would use the SetLimit property with the count of items in the selection set and in the for next loop run the MeterProgress method.

Regards - Nathan
*Tony Tanzillo
Message 24 of 27 (108 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-29-2007 08:35 PM in reply to: newArch
The progress meter's range is the value given
to SetLimit().

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

"Ron Hanson" wrote in message news:5610069@discussion.autodesk.com...
Very interesting thread. I have a question about the code below. What's the
purpose of objProgress.SetLimit(10000000) when the do loop is setting the
limit?

wrote in message news:5456938@discussion.autodesk.com...
For those using 2007 it is in the .NET API.

Here is a VB.NET Example.

Dim objProgress As ProgressMeter = New ProgressMeter
objProgress.SetLimit(10000000)
Dim intCount As Integer = 0
objProgress.Start()
Do Until intCount = 10000000
objProgress.MeterProgress()
intCount += 1
Loop
objProgress.Stop()
Distinguished Contributor
wesbird
Posts: 359
Registered: ‎12-05-2003
Message 25 of 27 (108 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-30-2007 11:09 AM in reply to: newArch
Hi Nathan:
I tried it in AutoCAD 2008 and got this when I compile it:
"Type 'ProgressMeter' is not defined."
What am I missing?
I found it, but is this for AutoCAD 2007 only, not in 2008?



Thank you

Wes
Vault Pro 2014, Windows 7 64 bit, AutoCAD (ACA, Map) 2014
Distinguished Contributor
eljobe
Posts: 706
Registered: ‎01-24-2003
Message 26 of 27 (108 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-30-2007 12:20 PM in reply to: newArch
You're using just the class name. If you don't use the fully qualified name, you have to use "Imports". Use the Object Browser to find the namespace that contains the class.
Distinguished Contributor
NathTay
Posts: 1,691
Registered: ‎12-15-2003
Message 27 of 27 (108 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-30-2007 03:56 PM in reply to: newArch
Sorry.

Autodesk.AutoCAD.Runtime.ProgressMeter

Regards - Nathan
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.