coordinates convertion

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
lulu
Posts: 25
Joined: 12 Nov 2009, 19:55

coordinates convertion

Post by lulu » 18 Nov 2010, 17:27

hi,
I have an AutoCAD drawing in a cadpictbox and I want to center it in a point (expressed in the coordinates of the AutoCAD drawing).
How can I do?

thanks,
lulu.

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: coordinates convertion

Post by support » 19 Nov 2010, 13:12

Hello.
CADImage.Draw method visualizes RectangleF object that represents an area of the CAD image. You need recalculate required center point from drawing coordinates to screen coordinates and fill RectangleF structure in consideration of scale. Please see the ResetScaling method within Viewer demo code as the example.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

lulu
Posts: 25
Joined: 12 Nov 2009, 19:55

Re: coordinates convertion

Post by lulu » 24 Nov 2010, 12:00

Hello,
thank you for your reply,
but I would want to know if there are a method for the coordinates conversion that I need...

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: coordinates convertion

Post by support » 24 Nov 2010, 15:09

Hello.
There is no any method that center drawing in a point with some zoom level. Such task can be completed within your own application using example from Viewer demo. If you meant method for conversion from drawing to screen coordinates then use CADImage.GetPoint method.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply