.NET

.NET

Reply
Active Member
newArch
Posts: 9
Registered: ‎07-03-2005
Message 1 of 27 (292 Views)

equivalent to arx "acedSetStatusBarProgressMeter" ?

292 Views, 26 Replies
01-04-2006 08:06 AM
hello

what is the equivalent to arx "acedSetStatusBarProgressMeter" ?
In other word how can i access to AutoCad StatusBarProgressMeter?

Thanks in advanced.
Contributor
GStevens
Posts: 19
Registered: ‎04-20-2006
Message 2 of 27 (291 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 02:23 AM in reply to: newArch
newArch,

Did you able to figure out how to implement acedSetStatusBarProgressMeter in .NET? If you do kindly teach me how to do it because I can't figure out how to declare "const char*" using P/Invoke and unsafe code.

Thank you in advance.
GStevens
*Tony Tanzillo
Message 3 of 27 (292 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 05:03 AM in reply to: newArch
[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl,
EntryPoint = ?acedSetStatusBarProgressMeter@@YAHPBDHH@Z)]
extern public static int acedSetStatusBarProgressMeter(string msg, int minpos, int maxpos);


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5181853@discussion.autodesk.com...
newArch,

Did you able to figure out how to implement acedSetStatusBarProgressMeter in .NET? If you do kindly teach me how to do it because I can't figure out how to declare "const char*" using P/Invoke and unsafe code.

Thank you in advance.
GStevens
Contributor
GStevens
Posts: 19
Registered: ‎04-20-2006
Message 4 of 27 (291 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 05:22 PM in reply to: newArch
Tony,
Thank you for your help but I encountered an exception as "Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe.".

These are my declarations and of course I had a reference to the following DLL's:
Autodesk.AutoCAD.Interop.dll
Autodesk.AutoCAD.Interop.Common.dll

[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeter",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeter( string label, int nMinPos, int nMaxPos);

[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeterPos",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeterPos(int nPos);

[DllImport(
"acad.exe",
EntryPoint="acedRestoreStatusBar",
CallingConvention=CallingConvention.Cdecl)]
extern public static void acedRestoreStatusBar();

Please tell me what do I missed?

This is the detailed error message:

{"Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe." }
[System.EntryPointNotFoundException]: {System.EntryPointNotFoundException}
System.Object: {System.EntryPointNotFoundException}
_COMPlusExceptionCode: -532459699
_className: null
_exceptionMethod: null
_exceptionMethodString: null
_message: "Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe."
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: null
_remoteStackTraceString: null
_remoteStackIndex: 0
_HResult: -2146233053
_source: null
_xptrs: 0
_xcode: -532459699
Message: "Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe."
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at Bsdc.Acad.Cmd.acedSetStatusBarProgressMeter(String label, Int32 nMinPos, Int32 nMaxPos)
at Bsdc.VolumeCalculation.ColVolume.ComputeVolumes(Point3d sp, Int32 nrows, Int32 ncols) in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 343
at Bsdc.VolumeCalculation.ColVolume..ctor(Point3d sp, Int32 nrows, Int32 ncols) in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 37
at Bsdc.VolumeCalculation.frmVolume.VolCalcMulti() in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\frmvolume.cs:line 1066"
HelpLink: ""
Source: "Bsdc.VolumeCalculation"
HResult: -2146233053


Thank you in advance.

GStevens
*Tony Tanzillo
Message 5 of 27 (291 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 09:11 PM in reply to: newArch
Take another look at my post, and note the EntryPoint parameter.
It doesn't look anything like the one you're using below.

Here is a C# class that wraps the progress meter:

http://www.caddzone.com/StatusBarProgressMeter.cs

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5182740@discussion.autodesk.com...
Tony,
Thank you for your help but I encountered an exception as "Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe.".

These are my declarations and of course I had a reference to the following DLL's:
Autodesk.AutoCAD.Interop.dll
Autodesk.AutoCAD.Interop.Common.dll

[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeter",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeter( string label, int nMinPos, int nMaxPos);

[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeterPos",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeterPos(int nPos);

[DllImport(
"acad.exe",
EntryPoint="acedRestoreStatusBar",
CallingConvention=CallingConvention.Cdecl)]
extern public static void acedRestoreStatusBar();

Please tell me what do I missed?

This is the detailed error message:

{"Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe." }
[System.EntryPointNotFoundException]: {System.EntryPointNotFoundException}
System.Object: {System.EntryPointNotFoundException}
_COMPlusExceptionCode: -532459699
_className: null
_exceptionMethod: null
_exceptionMethodString: null
_message: "Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe."
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: null
_remoteStackTraceString: null
_remoteStackIndex: 0
_HResult: -2146233053
_source: null
_xptrs: 0
_xcode: -532459699
Message: "Unable to find an entry point named acedSetStatusBarProgressMeter in DLL acad.exe."
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at Bsdc.Acad.Cmd.acedSetStatusBarProgressMeter(String label, Int32 nMinPos, Int32 nMaxPos)
at Bsdc.VolumeCalculation.ColVolume.ComputeVolumes(Point3d sp, Int32 nrows, Int32 ncols) in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 343
at Bsdc.VolumeCalculation.ColVolume..ctor(Point3d sp, Int32 nrows, Int32 ncols) in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 37
at Bsdc.VolumeCalculation.frmVolume.VolCalcMulti() in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\frmvolume.cs:line 1066"
HelpLink: ""
Source: "Bsdc.VolumeCalculation"
HResult: -2146233053


Thank you in advance.

GStevens
Distinguished Contributor
RolandF
Posts: 172
Registered: ‎11-19-2003
Message 6 of 27 (291 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 10:11 PM in reply to: newArch
Thank you, Tony, for this code.

--
Roland Feletic
Contributor
GStevens
Posts: 19
Registered: ‎04-20-2006
Message 7 of 27 (291 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 10:49 PM in reply to: newArch
Tony,

Thank you so much. You are a life saver.

GStevens
Contributor
GStevens
Posts: 19
Registered: ‎04-20-2006
Message 8 of 27 (292 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 10:55 PM in reply to: newArch
Tony,

Thank you for the knowledge. Now I figured it out what you are trying to say at the first time. I used dependency walker to get the function entry point.

GStevens
Distinguished Contributor
RolandF
Posts: 172
Registered: ‎11-19-2003
Message 9 of 27 (292 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-22-2006 11:00 PM in reply to: newArch
Now i tried your code and got a fatal error.
Unhandled e0434f4dh Exception at 7c81eb33h
Maybe i did something wrong, ;-)

--
Roland Feletic
"Tony Tanzillo" schrieb im Newsbeitrag
news:5182787@discussion.autodesk.com...
Take another look at my post, and note the EntryPoint parameter.
It doesn't look anything like the one you're using below.

Here is a C# class that wraps the progress meter:

http://www.caddzone.com/StatusBarProgressMeter.cs

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5182740@discussion.autodesk.com...
Tony,
Thank you for your help but I encountered an exception as "Unable to find an
entry point named acedSetStatusBarProgressMeter in DLL acad.exe.".

These are my declarations and of course I had a reference to the following
DLL's:
Autodesk.AutoCAD.Interop.dll
Autodesk.AutoCAD.Interop.Common.dll

[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeter",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeter( string label, int
nMinPos, int nMaxPos);

[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeterPos",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeterPos(int nPos);

[DllImport(
"acad.exe",
EntryPoint="acedRestoreStatusBar",
CallingConvention=CallingConvention.Cdecl)]
extern public static void acedRestoreStatusBar();

Please tell me what do I missed?

This is the detailed error message:

{"Unable to find an entry point named acedSetStatusBarProgressMeter in DLL
acad.exe." }
[System.EntryPointNotFoundException]:
{System.EntryPointNotFoundException}
System.Object: {System.EntryPointNotFoundException}
_COMPlusExceptionCode: -532459699
_className: null
_exceptionMethod: null
_exceptionMethodString: null
_message: "Unable to find an entry point named
acedSetStatusBarProgressMeter in DLL acad.exe."
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: null
_remoteStackTraceString: null
_remoteStackIndex: 0
_HResult: -2146233053
_source: null
_xptrs: 0
_xcode: -532459699
Message: "Unable to find an entry point named
acedSetStatusBarProgressMeter in DLL acad.exe."
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at Bsdc.Acad.Cmd.acedSetStatusBarProgressMeter(String
label, Int32 nMinPos, Int32 nMaxPos)
at Bsdc.VolumeCalculation.ColVolume.ComputeVolumes(Point3d sp, Int32
nrows, Int32 ncols) in
e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 343
at Bsdc.VolumeCalculation.ColVolume..ctor(Point3d sp, Int32 nrows, Int32
ncols) in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 37
at Bsdc.VolumeCalculation.frmVolume.VolCalcMulti() in
e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\frmvolume.cs:line 1066"
HelpLink: ""
Source: "Bsdc.VolumeCalculation"
HResult: -2146233053


Thank you in advance.

GStevens
*Tony Tanzillo
Message 10 of 27 (291 Views)

Re: equivalent to arx "acedSetStatusBarProgressMeter" ?

05-23-2006 01:10 AM in reply to: newArch
I added the sample usage code before I
posted the file, and did not test it.

Try the updated copy I just posted.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5182763@discussion.autodesk.com...
Now i tried your code and got a fatal error.
Unhandled e0434f4dh Exception at 7c81eb33h
Maybe i did something wrong, ;-)

--
Roland Feletic
"Tony Tanzillo" schrieb im Newsbeitrag
news:5182787@discussion.autodesk.com...
Take another look at my post, and note the EntryPoint parameter.
It doesn't look anything like the one you're using below.

Here is a C# class that wraps the progress meter:

http://www.caddzone.com/StatusBarProgressMeter.cs

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5182740@discussion.autodesk.com...
Tony,
Thank you for your help but I encountered an exception as "Unable to find an
entry point named acedSetStatusBarProgressMeter in DLL acad.exe.".

These are my declarations and of course I had a reference to the following
DLL's:
Autodesk.AutoCAD.Interop.dll
Autodesk.AutoCAD.Interop.Common.dll

[System.Security.SuppressUnmanagedCodeSecurity]
[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeter",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeter( string label, int
nMinPos, int nMaxPos);

[DllImport(
"acad.exe",
EntryPoint="acedSetStatusBarProgressMeterPos",
CallingConvention=CallingConvention.Cdecl)]
extern public static int acedSetStatusBarProgressMeterPos(int nPos);

[DllImport(
"acad.exe",
EntryPoint="acedRestoreStatusBar",
CallingConvention=CallingConvention.Cdecl)]
extern public static void acedRestoreStatusBar();

Please tell me what do I missed?

This is the detailed error message:

{"Unable to find an entry point named acedSetStatusBarProgressMeter in DLL
acad.exe." }
[System.EntryPointNotFoundException]:
{System.EntryPointNotFoundException}
System.Object: {System.EntryPointNotFoundException}
_COMPlusExceptionCode: -532459699
_className: null
_exceptionMethod: null
_exceptionMethodString: null
_message: "Unable to find an entry point named
acedSetStatusBarProgressMeter in DLL acad.exe."
_innerException: null
_helpURL: null
_stackTrace: {System.Array}
_stackTraceString: null
_remoteStackTraceString: null
_remoteStackIndex: 0
_HResult: -2146233053
_source: null
_xptrs: 0
_xcode: -532459699
Message: "Unable to find an entry point named
acedSetStatusBarProgressMeter in DLL acad.exe."
InnerException: null
TargetSite: {System.Reflection.RuntimeMethodInfo}
StackTrace: " at Bsdc.Acad.Cmd.acedSetStatusBarProgressMeter(String
label, Int32 nMinPos, Int32 nMaxPos)
at Bsdc.VolumeCalculation.ColVolume.ComputeVolumes(Point3d sp, Int32
nrows, Int32 ncols) in
e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 343
at Bsdc.VolumeCalculation.ColVolume..ctor(Point3d sp, Int32 nrows, Int32
ncols) in e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\colvolume.cs:line 37
at Bsdc.VolumeCalculation.frmVolume.VolCalcMulti() in
e:\volume\csmgdacadvolcalc\csmgdacadvolcalc\frmvolume.cs:line 1066"
HelpLink: ""
Source: "Bsdc.VolumeCalculation"
HResult: -2146233053


Thank you in advance.

GStevens
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.