.NET

Reply
Active Contributor
dhorger
Posts: 46
Registered: ‎06-18-2003
Message 1 of 6 (609 Views)
Accepted Solution

StartUserInteraction for AutoCAD 2013

609 Views, 5 Replies
07-31-2012 09:35 AM

I'm trying to update some VB.Net code for AutoCAD 2013, and am slowly slogging my way through the API changes. Here's one I haven't been able to figure out yet:

 

The following line worked in pre-2013, but not anymore...

Dim eui AsEditorUserInteraction = Application.DocumentManager.MdiActiveDocument.Editor.StartUserInteraction(Me)

 

I get this error in the editor...

Error 12 Value of type 'IECAD.fSymbols' cannot be converted to 'System.IntPtr'.

 

IECAD.fSymbols is a form in my application, and the error references the Me in my statement. What is the current correct way to activate a form while allowing for user interaction (like picking a point)?

 

Thanks.

Never mind... I figured it out. Changing Me to Me.Handle did the trick.

 

Hope this helps someone else!

Active Contributor
dhorger
Posts: 46
Registered: ‎06-18-2003
Message 2 of 6 (606 Views)

Re: StartUserInteraction for AutoCAD 2013

07-31-2012 10:02 AM in reply to: dhorger

Never mind... I figured it out. Changing Me to Me.Handle did the trick.

 

Hope this helps someone else!

Distinguished Mentor
andrewpuller3811
Posts: 785
Registered: ‎07-30-2008
Message 3 of 6 (535 Views)

Re: StartUserInteraction for AutoCAD 2013

09-23-2012 03:54 AM in reply to: dhorger

Thanks for posting your solution.

If this fixed your issue, click on "Accept as Solution"

Andrew Puller
Maitland, NSW, Australia
Windows 7 Enterprise 64bit
Intel core i7 2600 @ 3.40 GHz with 16GB Ram
Civil 3d 2013 64bit
Member
cfiene
Posts: 4
Registered: ‎09-29-2011
Message 4 of 6 (470 Views)

Re: StartUserInteraction for AutoCAD 2013

10-11-2012 12:11 PM in reply to: dhorger

Thanks for the solution! It was driving me caazy!!!

Active Contributor
dhorger
Posts: 46
Registered: ‎06-18-2003
Message 5 of 6 (464 Views)

Re: StartUserInteraction for AutoCAD 2013

10-11-2012 01:11 PM in reply to: cfiene

Glad to help!

Contributor
mjsmith
Posts: 14
Registered: ‎06-23-2008
Message 6 of 6 (32 Views)

Re: StartUserInteraction for AutoCAD 2013

11-04-2014 09:19 AM in reply to: dhorger

Excellent post!!!! Thanks a bunch.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!