VB.NET - List Commands - FATAL ERROR

VB.NET - List Commands - FATAL ERROR

Anonymous
Not applicable
1,521 Views
3 Replies
Message 1 of 4

VB.NET - List Commands - FATAL ERROR

Anonymous
Not applicable
I've attached a snippet of code that I "borrowed" from Kean Walmsley's site:
http://through-the-interface.typepad.com/through_the_interface/commands/page/2/
dated March 15, 2007
titled "Getting the list of .NET-defined commands in AutoCAD"
It's written in C# and I personally translated it to VB.NET (though maybe not well).
The program runs and executes properly, but then pauses and generates the following error:
"FATAL ERROR: Unhandled Access Violation Reading 0x0000 Exception at cc1f946h"

I am not sure if it's improper code translation or what the deal is. I tried using a Try...Catch statement, but it catches no errors. Basically, the code is through executing when the fatal error occurs. Maybe somebody knows what else could be happening? I am using AutoCAD MEP 2009 and Visual Studio 2008 Express Edition.
0 Likes
1,522 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
Why not just run the original code through a translator?

That would also help you find any error in your manaual translation.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6250954@discussion.autodesk.com...
I've attached a snippet of code that I "borrowed" from Kean Walmsley's site:
http://through-the-interface.typepad.com/through_the_interface/commands/page/2/
dated March 15, 2007
titled "Getting the list of .NET-defined commands in AutoCAD"
It's written in C# and I personally translated it to VB.NET (though maybe
not well).
The program runs and executes properly, but then pauses and generates the
following error:
"FATAL ERROR: Unhandled Access Violation Reading 0x0000 Exception at
cc1f946h"

I am not sure if it's improper code translation or what the deal is. I
tried using a Try...Catch statement, but it catches no errors. Basically,
the code is through executing when the fatal error occurs. Maybe somebody
knows what else could be happening? I am using AutoCAD MEP 2009 and Visual
Studio 2008 Express Edition.
0 Likes
Message 3 of 4

Anonymous
Not applicable
Tony, I tried 2 out of 3 of Kean's suggestions at:
http://through-the-interface.typepad.com/through_the_interface/visual_basic/
dated July 22, 2009
titled "Converting between C# and VB.NET"

When I pasted the C# code and hit the "Translate" button, both Carlos Aguilar Mares' and developerFusion's translators erased the pasted code rather than translating it. Do you know a site that works?

Also, as I posted yesterday, I saw a declaration that did not seem right.
I tried Dim meths() As MethodInfo, as opposed to posted code, but there was no difference in the result.

Well, what do ya know!!! Carlos' translator bombed again today, but developerFusions' worked okay this time.
I'll see if this is going to help me out. Edited by: Mep09Developer on Sep 9, 2009 8:14 AM
0 Likes
Message 4 of 4

Anonymous
Not applicable
Solved. It was definitely my trying to translate the code in my head.
I was way off the mark using ReDims, etc., and not even aware of TryCast and DirectCast.
0 Likes