.NET

Reply
Contributor
jgarciaanton
Posts: 20
Registered: ‎08-23-2006
Message 1 of 6 (131 Views)

MouseMove ?

131 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
Alexander Rivilis
Posts: 303
Registered: ‎09-26-2004
Message 2 of 6 (131 Views)

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
pavlos.katsonis
Posts: 67
Registered: ‎09-12-2006
Message 3 of 6 (131 Views)

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
jgarciaanton
Posts: 20
Registered: ‎08-23-2006
Message 4 of 6 (131 Views)

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
Alexander Rivilis
Posts: 303
Registered: ‎09-26-2004
Message 5 of 6 (131 Views)

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
cgay
Posts: 125
Registered: ‎08-02-2005
Message 6 of 6 (131 Views)

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
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.