OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: velasquez on December 16, 2010, 05:17:09 AM

Title: dcl_GetDwgMouseCoords
Post by: velasquez on December 16, 2010, 05:17:09 AM
The return of the function dcl_GetDwgMouseCoords is not same the function grread 5 of AutoCAD? 
 
See (setq ptgrread (grread 5)) and (setq ptOpenDCL (dcl_GetDwgMouseCoords)) 
The very different healthy values. 
Should not the return be the position of the cursor of the mouse?

Velasquez
Title: Re: dcl_GetDwgMouseCoords
Post by: owenwengerd on December 16, 2010, 06:47:19 AM
I don't think there would be any need for a special function if it was identical to (grread), but I'm not quite sure how they are supposed to be different. I looked at the code, and I'm pretty sure the current implementation has a bug because it doesn't account for the document window client coordinate offset from screen coordinates, but even correcting for this, it looks like the results do not quite match (grread).
Title: Re: dcl_GetDwgMouseCoords
Post by: velasquez on December 16, 2010, 08:22:10 AM
Quote from: owenwengerd on December 16, 2010, 06:47:19 AM
I don't think there would be any need for a special function if it was identical to (grread), but I'm not quite sure how they are supposed to be different. I looked at the code, and I'm pretty sure the current implementation has a bug because it doesn't account for the document window client coordinate offset from screen coordinates, but even correcting for this, it looks like the results do not quite match (grread).

I didn't understand your answer. 
will dcl_GetDwgMouseCoords come back the correct position of the cursor of the mouse in the next version?
Title: Re: dcl_GetDwgMouseCoords
Post by: owenwengerd on December 16, 2010, 08:37:47 AM
I can't answer that because I don't know what you mean by "correct".
Title: Re: dcl_GetDwgMouseCoords
Post by: velasquez on December 16, 2010, 10:26:29 AM
Quote from: owenwengerd on December 16, 2010, 08:37:47 AM
I can't answer that because I don't know what you mean by "correct".

I think the correct return of dcl_GetDwgMouseCoords would be the position of the cursor of the mouse. 
See the image.
Title: Re: dcl_GetDwgMouseCoords
Post by: owenwengerd on December 16, 2010, 12:16:05 PM
Do you think it should return the same thing as (grread)?  If so, why not just use (grread)?
Title: Re: dcl_GetDwgMouseCoords
Post by: velasquez on December 16, 2010, 01:05:18 PM
Quote from: velasquez on December 16, 2010, 10:26:29 AM
Quote from: owenwengerd on December 16, 2010, 08:37:47 AM
I can't answer that because I don't know what you mean by "correct".

I think the correct return of dcl_GetDwgMouseCoords would be the position of the cursor of the mouse. 
See the image.

I don't use grread for the function it is very closed, while she is running. 
dcl_GetDwgMouseCoords would be very good to simulate an I drag for instance. 
So that it serves dcl_GetDwgMouseCoords as this today?
Title: Re: dcl_GetDwgMouseCoords
Post by: velasquez on December 20, 2010, 02:46:12 AM
Should I add a Feature request for dcl_GetDwgMouseCoords to return the coordinate of the position of the cursor of the mouse? 
Can this be assisted? 
Thanks
Title: Re: dcl_GetDwgMouseCoords
Post by: owenwengerd on December 20, 2010, 02:31:38 PM
Yes, but you have to define "position of the cursor" (i.e. what units of measure, and relative to what). Should it return the same coordinates as (grread)? Those are relative to the current viewport. For dragging, wouldn't you use (dcl_GetMouseCoords) instead? 
Title: Re: dcl_GetDwgMouseCoords
Post by: velasquez on December 21, 2010, 02:52:47 AM
Quote from: owenwengerd on December 20, 2010, 02:31:38 PM
Yes, but you have to define "position of the cursor" (i.e. what units of measure, and relative to what). Should it return the same coordinates as (grread)? Those are relative to the current viewport. For dragging, wouldn't you use (dcl_GetMouseCoords) instead? 

The function dcl_GetDwgMouseCoords is ideal to drag an object while a point is asked for. 
Should it return the same coordinates as (grread) relative to the current viewport. 
The problem is that (grread) it doesn't allow OSNAPS while this working.