TheSwamp
Code Red => .NET => Topic started by: MexicanCustard on November 16, 2011, 01:54:32 PM
-
I've got a long operation where I'm creating new DWG files, adding Xrefs, and saving them. Whenever Database.SaveAs() executes it removes the ProgressMeter from the taskbar. So my users cant see it until the operation is complete.
example:
ProgressMeter pmeter = new ProgressMeter();
pmeter.SetLimit(floors.Count);
pmeter.Start();
foreach ( floor in floors)
{
Database newDB = Database(false, false);
newDB.ReadDwgFile("acad.dwt", FileShare.ReadWrite, false, null);
//add some xrefs
newDB.SaveAs("New Project.dwg", false, DwgVersion.Current, null); <--- Meter disappears here;
pmeter.MeterProgress();
System.Windows,Forms.Application.DoEvents();
}
pmeter.Stop();
Anybody know how to make it stop disappearing or bring it back?
-
BUMP. No one else have this problem?
-
Noob response:
When you normally do a Save As is your drawing, AutoCAD displays a progress meter. Could it be that this progress meter is conflicting with the one you're trying to display?
-
DashMonkey, thats exactly whats happening. Sorry for not updating this info. I had asked Kean that exact question and he didnt know of anyway to stop the default behavior from overwriting my meter and then turning it off.
I guess I'll have to create a dialog with a progress meter in it and forego the built in one.
-
MexicanCustard,
Good fortune with a solution.
Please post back and let us know how you get along.
Regards