Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I get the y coordinate of a line if I only know the x coordinate.

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
336 Views, 7 Replies

How do I get the y coordinate of a line if I only know the x coordinate.

I want to give the x coordinate and get the y coordinate of a given line.
Any ideas?
Tom
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

sorry.
of a given polyline.
Message 3 of 8
Anonymous
in reply to: Anonymous

one idea could be to draw a ray with your x-coordinate from y ( = less then
your minimum y of any vertex in your line/pline) vertical up and then get
the intersections (if pline, you may get more than one)

- alfred -

"Tom" schrieb im Newsbeitrag
news:f11c54a.0@WebX.maYIadrTaRb...
> sorry.
> of a given polyline.
>
>
Message 4 of 8
shan
in reply to: Anonymous

I am having a similar issue trying to get a z coordinate for a surface by inputting an (x,y); the autocad 'ID' command may help you
Message 5 of 8
Anonymous
in reply to: Anonymous

Shan,

    Are you using LDD?  Because
that's exactly what I'm trying to do.  What I really want to do is get the
elevation of a given station on an alignment.  I can do it with LDD's pull
downs but not with lisp.  What I've gotten down to is using a
profile to get the elevation.  Do you have anything that might help
me?

I'll be sure to tell you if I find anything
out.

Thanks,

Tom


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am having a similar issue trying to get a z coordinate for a surface by
inputting an (x,y); the autocad 'ID' command may help
you
Message 6 of 8
Anonymous
in reply to: Anonymous

Shan,

 

See my post in response to your ID command
post.

 

-Edgetrimmer

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
am having a similar issue trying to get a z coordinate for a surface by
inputting an (x,y); the autocad 'ID' command may help
you
Message 7 of 8
Anonymous
in reply to: Anonymous

Is your polyline a 3D Polyline? Is the point you're

after one of the vertices of the polyline or between 2

vertices.



I don't know LDD and I just work with plain AutoCAD

but if the z-coords you're after can be determined

by calculations, then you can do it in Autolisp.



Leo
Message 8 of 8
Anonymous
in reply to: Anonymous

(setq y (nth 1 (inters pt1 pt2 (list x 0) (polar (list x 0) (* pi 0.5) 1)
nil)))
where pt1 is the start point and pt2 is the end point of the line
Be sure osmode is 0

"Tom" wrote in message news:f11c54a.-1@WebX.maYIadrTaRb...
> I want to give the x coordinate and get the y coordinate of a given line.
> Any ideas?
> Tom
>
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost