.NET

.NET

Reply
Active Member
reli
Posts: 6
Registered: ‎03-30-2006
Message 1 of 7 (70 Views)

Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

70 Views, 6 Replies
03-30-2006 11:34 AM
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?
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 2 of 7 (70 Views)

Re: Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

03-30-2006 01:20 PM 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
Active Member
reli
Posts: 6
Registered: ‎03-30-2006
Message 3 of 7 (70 Views)

Re: Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

03-30-2006 01:28 PM 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.
Distinguished Contributor
RonnieWilkins
Posts: 454
Registered: ‎04-07-2003
Message 4 of 7 (70 Views)

Re: Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

04-03-2006 07:13 AM 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.
AMS CAD + CAFM Solutions
Sr. Solutions Developer
Autodesk Certified Instructor: Inventor
Active Member
reli
Posts: 6
Registered: ‎03-30-2006
Message 5 of 7 (70 Views)

Re: Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

04-03-2006 08:36 AM in reply to: reli
The same exception is thrown with Loader Lock disabled.
*Tony Tanzillo
Message 6 of 7 (70 Views)

Re: Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

04-03-2006 09:41 AM 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?
Active Member
reli
Posts: 6
Registered: ‎03-30-2006
Message 7 of 7 (70 Views)

Re: Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

04-03-2006 10:02 AM 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).
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.