.NET

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

Debugging ContextMenuExtensions with ACAD 2007 & VB.NET 2005

64 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
Posts: 125
Registered: ‎08-02-2005
Message 2 of 7 (64 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
Posts: 6
Registered: ‎03-30-2006
Message 3 of 7 (64 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
Posts: 453
Registered: ‎04-07-2003
Message 4 of 7 (64 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
Posts: 6
Registered: ‎03-30-2006
Message 5 of 7 (64 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 (64 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
Posts: 6
Registered: ‎03-30-2006
Message 7 of 7 (64 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).

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community