TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: HasanCAD on March 01, 2019, 01:14:14 AM
-
Hi all
I am trying to get a list of perpanducular points of alligned objects
but the list comes in strage format
((((((((nil 20.2771 10.3859 0.0) 20.9515 9.64759 0.0) 21.6259 8.90925 0.0) 22.3004 8.1709 0.0) 22.9748 7.43256 0.0) 23.6492 6.69422 0.0) 24.3236 5.95587 0.0) 24.791 6.38282 0.0)
edit kdub : Topics Merged
-
ssget normaly returns the objects in order they had been created.
you need to sort the points relative to P1 in the distance
-
The code cannot produce the supplied return I think. The variable 'ps' is nil throughout.
But this:
(setq dtlst (cons ps p1n))
Should probably be:
(setq dtlst (cons p1n dtlst))
-
You calculate a point assigned to variable p1n, but construct the list dtlst using variable ps which is not defined in your posted code.
-
Thanks CADwiesel
Thanks roy_043
Thanks Lee
-
If you use the fence option in your ssget it will pick objects in order. you have pt1 pt2
(setq lst (list p1 p2))
(setq objs (ssget "F" lst (list (cons 0 "line"))))
-
If you use the fence option in your ssget it will pick objects in order. you have pt1 pt2
(setq lst (list p1 p2))
(setq objs (ssget "F" lst (list (cons 0 "line"))))
Thanks BIGAL
-
If you use the fence option in your ssget it will pick objects in order. you have pt1 pt2
(setq lst (list p1 p2))
(setq objs (ssget "F" lst (list (cons 0 "line"))))
Fence option will never detect hidden lines of example if the vector line of variables p1 & p2 passed through the empty gap of the line type.
-
Thanks Tharwat have had that happen in day to day stuff. Its another of those frustrating Autocad lisp bugs.
-
Thanks Tharwat have had that happen in day to day stuff. Its another of those frustrating Autocad lisp bugs.
Its my pleasure.