Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

Anonymous
Not applicable
436 Views
6 Replies
Message 1 of 7

Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

Anonymous
Not applicable
When I netload the EventsWatcher sample include with ObjectARX in debug mode it throws an InvalidOperationException when it trys to add in a context menu extension :

Application.AddDefaultContextMenuExtension(s_cme);

If I run from outside of VS.NET, it works file. Is there some VS.NET 2005 or ACAD 2007 configuration option that I need to set to allow me to debug applications that utilize a default context menu extension?
0 Likes
437 Views
6 Replies
Replies (6)
Message 2 of 7

cgay
Enthusiast
Enthusiast
reli,

Not sure if this helps but......
Are you using the right version of Object ARX?
Are you referencing the correct acdbmgd.dll and acmgd.dll for AutoCAD 2007?

Autodesk stated that they broke binary compatibility between v2006 & v2007 so this would be my starting point...

C
0 Likes
Message 3 of 7

Anonymous
Not applicable
Yes, I'm using the version from the ObjectARX 2007\inc folder. I removed and re-added the references just to make sure.
0 Likes
Message 4 of 7

RonnieWilkins
Advocate
Advocate
Maker sure LoaderLock is disabled.

Inside of VS2005 with a project open, goto Debug > Exceptions..., expand Managed Debugging Assistants, uncheck LoaderLock.
Ronnie Wilkins, Jr.
0 Likes
Message 5 of 7

Anonymous
Not applicable
The same exception is thrown with Loader Lock disabled.
0 Likes
Message 6 of 7

Anonymous
Not applicable
Is the code in which you create the context menu
extension called in the Application context ?

--
http://www.caddzone.com

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

wrote in message news:5127401@discussion.autodesk.com...
When I netload the EventsWatcher sample include with ObjectARX in debug mode it throws an InvalidOperationException when it trys to add in a context menu extension :

Application.AddDefaultContextMenuExtension(s_cme);

If I run from outside of VS.NET, it works file. Is there some VS.NET 2005 or ACAD 2007 configuration option that I need to set to allow me to debug applications that utilize a default context menu extension?
0 Likes
Message 7 of 7

Anonymous
Not applicable
I'm using an unmodifed version of the EventWatcher example that is suppiled part of the ObjectARX 2007 SDK. The main application class extends IExtensionApplication and the DefaultContextMenuExtension is added by a static method call that is part of a seperate static class.

Initialize() invokes DefaultContextMenu.AddMe() which creates a ContextMenuExtension and then calls Application.AddDefaultContextMenuExtension(s_cme).
0 Likes