I wanted one so here it is...some may find this useful also:
namespace ClassLibrary
{
public class tcgsClass
{
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,
EntryPoint = "?acedSetStatusBarProgressMeter@@YAHPBDHH@Z")]
private static extern int acedSetStatusBarProgressMeter(string label, int minPos, int maxPos);
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,
EntryPoint = "?acedSetStatusBarProgressMeterPos@@YAHH@Z")]
private static extern int acedSetStatusBarProgressMeterPos(int pos);
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,
EntryPoint = "?acedRestoreStatusBar@@YAXXZ")]
private static extern int acedRestoreStatusBar();
public tcgsClass( ) { }
// Our one and only command
[CommandMethod("PBAR")]
static public void PBARCommand( )
{
acedSetStatusBarProgressMeter("Testing:", 0, 1000000);
for (int i = 0; i < 1000000; i++)
acedSetStatusBarProgressMeterPos(i);
acedRestoreStatusBar();
}
}
}
Cheers,
Glenn.