.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

6 REPLIES 6
Reply
Message 1 of 7
reli
249 Views, 6 Replies

Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

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?
6 REPLIES 6
Message 2 of 7
cgay
in reply to: reli

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
Message 3 of 7
reli
in reply to: reli

Yes, I'm using the version from the ObjectARX 2007\inc folder. I removed and re-added the references just to make sure.
Message 4 of 7
RonnieWilkins
in reply to: reli

Maker sure LoaderLock is disabled.

Inside of VS2005 with a project open, goto Debug > Exceptions..., expand Managed Debugging Assistants, uncheck LoaderLock.
Ronnie Wilkins, Jr.
Message 5 of 7
reli
in reply to: reli

The same exception is thrown with Loader Lock disabled.
Message 6 of 7
Anonymous
in reply to: reli

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?
Message 7 of 7
reli
in reply to: reli

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).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost