Code Red > .NET

How to use "Editor.PointToScreen " ?

(1/2) > >>

itcad:
How to use "Editor.PointToScreen " ?

Kerry:

What have you tried ?

itcad:

--- Quote from: Kerry Brown on December 18, 2007, 10:31:54 PM ---
What have you tried ?


--- End quote ---

I want to  put cursor to a point3d.

David Hall:
POst your code you have tried and we can see whats wrong

itcad:

--- Quote from: CmdrDuh on December 20, 2007, 09:49:14 AM ---POst your code you have tried and we can see whats wrong

--- End quote ---

My code:
  Point3d pt = new Point3d(100, 200, 0);
Autodesk.AutoCAD.ApplicationServices.Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
 Editor ed = doc.Editor;
int viewPortNumber = Convert.ToInt32(Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("cvport").ToString());
Cursor.Position = ed.PointToScreen(pt, viewPortNumber);

Run my code,Position of cursor  is different from the pt(100, 200, 0).
why?

Navigation

[0] Message Index

[#] Next page

Go to full version