This .NET class wraps the AcDbHostApplicationProgressMeter ObjectARX class.
At various points, the database code will attempt to either create a temporary progress meter, or modify a single global progress meter. If you would like the database code to display its progress in your application, you should implement a progress meter by deriving from the HostApplicationProgressMeter class. This meter can display in any fashion you choose, but must implement the start(), stop(), meterProgress(), and setLimit() methods.
HostApplicationProgressMeter falls into the "may override" category. If you do not override the class, a default implementation that does nothing will be used by the database code. It is not anticipated that the ObjectARX applications or RealDWG host applications would ever need to directly call these methods. These methods are called by the database code itself. However, it will not cause any error for either type of application to generate, use, and delete instances of this class for whatever purpose suits them.
You will need to override one method of HostApplicationServices and call another to inform ObjectDBX about your derived progress meter class. The newProgressMeter() method of HostApplicationServices should be overridden to instantiate and return a progress meter of your derived type. This method will be called whenever ObjectDBX needs to create a temporary progress meter. The code that calls newProgressMeter() will take care of deleting a progress meter instantiated in this way.
The method you must call is setWorkingProgressMeter(). ObjectDBX expects to use a single progress meter, that exists throughout the session, for all metering of DWG open operations. You can make certain that a progress meter of your derived type is available by instantiating it early on and calling the HostApplicationServices.setWorkingProgressMeter() method. You are responsible for deleting this instance of the progress meter before exiting your application.
Autodesk.AutoCAD.Runtime.DisposableWrapper Autodesk.AutoCAD.Runtime.ProgressMeter
Public Class ProgressMeter Inherits DisposableWrapper
public class ProgressMeter : DisposableWrapper;
Comments? |