Good Day,
I'm writing a c sharp program in visual studio for autocad designed to calculate an invert level at a place the user clicks, then inserts a Level_Arrow block stating that level at the point they clicked. My current problem is I need ask the user to click on a base point, and then I need to extract only the Y value of those coordinates for use in my calculations.
Does anyone know a method that will allow me to extract that value from the coordinates?
Please note I've experience with Lisp but very little experience with C sharp, if the answer could be as simple as possible and well explained I would be grateful.
Thank you,
Solved! Go to Solution.
Solved by _gile. Go to Solution.
Hi,
The Point3d structure has a Y property.
Assuming you get the user picked point with the Editor.GetPoint() method.
PromptPointResult ppr = ed.GetPoint("\nPick a point: "); if (ppr.Status == PromptStatus.OK) { Point3d pt = ppr.Value; double yCoord = pt.Y; // do your stuff with yCoord }