vlax-curve-getDistAtPoint retu
Hi All,Please Help me understand why am I getting "vlax-curve-getDistAtPoint" results as nil.
(setq a (car (entsel "\nSelect Line:")))(setq b (getpoint "\nPickPoint"))(setq b (vlax-curve-getDistAtPoint a (vlax-curve-getClosestPointTo a b)))
Attached is the drawing in which I am getting an error Please refer.
Thanks in advance
Aaryan
0011.dwg That trouble-maker entity is a fitted polyline, so I suspect that this is the reason that prevents your code to work as expected.
After decurved it (command PEDIT --> Decurve) it return the required value. Put the osmode system variable to zero and try again @Mircea
Thanks Mircea You are right.
How can I make sure through lisp that a selected line is Decurved.
@Tharwat
I tried but still getting an error but thanks for your help.
Regards
Aaryan What is it that you want for result? I mean what should the program do? I believe @Aaryan's code is self-explanatory; after selecting a curve and a point, the point will be projected on the said curve and the distance between the start point of the curve and that projection will be calculated. I believe @Aaryan's code is self-explanatory; after selecting a curve and a point, the point will be projected on the said curve and the distance between the start point of the curve and that projection will be calculated. So, the above code excerpt should return a real number. One difference is that the fitted item is no longer LWPOLYLINE type and become POLYLINE (old type). The objects are too distant from the UCS origin, try place them in the vicinity of 0,0,0
So I should use (ssget "_:E:S") with filter for LWpolyline.
Thanks it solved the problem.
Regards
页:
[1]
2