.NET

Reply
Contributor
20 Posts
0 Kudos
Registered: ‎08-23-2006
Post 1 of 6

MouseMove ?

134 Views, 5 Replies
09-14-2006 09:52 AM
Hi,

I need a way to create a circle in AutoCAD 2007 and let the user move it around the screen to a desired position, then place it with a mouse click.

I can draw a circle, but I cant find a way to obtain the current position of the mouse in autoCAD to move the circle. Is there a way ?

I have seen a few posts on Drag / Drop but none of then seem to give a definite answer. Can anyone give a few hints on which way to go ?

Thanks
j
Distinguished Contributor
303 Posts
1 Kudo
Registered: ‎09-26-2004
Post 2 of 6

Re: MouseMove ?

09-14-2006 10:56 AM in reply to: jgarciaanton
Read this topic: http://www.theswamp.org/index.php?topic=11340.0
Valued Contributor
67 Posts
0 Kudos
Registered: ‎09-12-2006
Post 3 of 6

Re: MouseMove ?

09-14-2006 11:33 AM in reply to: jgarciaanton
Have a look at the following sample shipped with ObjectARX:
samples\dotNet\EllipseJig
It uses the Drag method of the Editor which standardizes the process
Contributor
20 Posts
0 Kudos
Registered: ‎08-23-2006
Post 4 of 6

Re: MouseMove ?

09-15-2006 04:05 AM in reply to: jgarciaanton
Thanks Pavlos and Alexander for your answers.

Alex, following your thread I have ended on this link given by Tony Tanzillo.

http://www.caddzone.com/InsertJig.cs

If I try to translate the code to VB.NET I get an error on the line

JigPromptOptions jigOpts = new JigPromptOptions();
translated to :
Dim jigOpts As New JigPromptOptions()

On VB the error given is :
'New' cannot be used on a class that is declared 'MustInherit'

And if I put the code into a C# project it gives :
Cannot create an instance of the abstract class or interface
AutoDesk.AutoCAD.EditorInput.JigPromptOptions

Does anyone know why this happens ?

Thanks
j.
Distinguished Contributor
303 Posts
1 Kudo
Registered: ‎09-26-2004
Post 5 of 6

Re: MouseMove ?

09-15-2006 08:09 AM in reply to: jgarciaanton
What version of AutoCAD and MS VS you using?
This smple compiled witout errors in VS 2002, 2005< SharpDeveloper 2.0 Message was edited by: Alexander Rivilis
Distinguished Contributor
125 Posts
0 Kudos
Registered: ‎08-02-2005
Post 6 of 6

Re: MouseMove ?

09-15-2006 08:19 AM in reply to: jgarciaanton
Here is the ellipse jig sample translated to VB.NET 2005

Hope it helps.

C
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!