<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: First object intersected by a ray in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334321#M78176</link>
    <description>&lt;P&gt;Nice idea Kent .. like you say though, the step size is crucial to getting only one item. My test drawing is very small so it returned 2 items even with a step of 0.1.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":clinking_beer_mugs:"&gt;🍻&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 283px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/732744iAB196B3F8716BDB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Edit ... do you know when AutoCAD started not requiring items to be on screen for point selections? I could remove all that zooming mumbo jumbo in my code above.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Feb 2020 20:15:45 GMT</pubDate>
    <dc:creator>ronjonp</dc:creator>
    <dc:date>2020-02-21T20:15:45Z</dc:date>
    <item>
      <title>First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9331706#M78170</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;imagine I have a ray starting from a point, intersecting 10000 objects.&lt;/P&gt;&lt;P&gt;Can I somehow find the first object the ray intersects without the urge of creating selection set that includes each of these objects and then comparing the intersecting points? Because this method is rather inefficient.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 18:57:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9331706#M78170</guid>
      <dc:creator>davidkoh007</dc:creator>
      <dc:date>2020-02-20T18:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9331902#M78171</link>
      <description>&lt;P&gt;No is the short answer. AutoCAD is dumb. It is a database that contains a list of visible and invisible objects each of which has properties about itself, not how it interacts with other objects. You have described the outline of one method using a lisp (or vba/.net/arx) , the other is "by eye".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Autocad is pretty fast and almost all visible object have an IntersectWith method, so you find the intersection point or not for each object and if there is one or more than one then calculate the distance from the start of the RAY for each object that has an intersection and store the distance and entity as a list within a list. Then sort the main list by distance. The cadr of the first item in the list (if sorted correctly) will be the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively you could zoom extents then construct a rectangle usuing the rectangle command and the extmin and extmax system variables, find the intersection of the ray with this entity and use that to construct a selection set using the fence option. If the origin of the ray is the first point in the fence list and if the ray is excluded the first item in the selection set should be the closest object.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 20:34:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9331902#M78171</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-02-20T20:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9332160#M78172</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7183096"&gt;@davidkoh007&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think my approach would try to reduce the amount of entities selected in a selection set, that would optimistically reduce the amount of time spent searching for entities and processing them.&lt;/P&gt;&lt;P&gt;Something like this workflow:&lt;/P&gt;&lt;PRE&gt;- store EXTMAX and EXTMIN (now we have a 'box' of coordinates to use)
- when RAY is selected, use vector to calculate the point where your ray intersects our 'box'
- now we have our 2 points to work with on our RAY
*normally at this point I would zoom-window to these 2 points, then use
a Crossing-Polygon selset filter, but since we have about 10k objects
lets first divide this length into quarters. So...*
- use polar function from our ray base point to calculate a new point 1/4 distance away
(polar pBase ang (* 0.25 (distance pBase pIntersect)))
- Now, we can zoom-window to these 2 points
- check IF we get a Crossing Polygon using these 2 points
- if so, we will HOPEFULLY have about 2500 entities to process
(assuming they are mostly evenly distributed within your dwg)
- if we get NO selection set, then calculate another Crossing Polygon
area further out until we can return a selection set to process.
- Once we have entities to process, we can use an intersect function
with our distance function to calculate which element is closest&lt;/PRE&gt;&lt;P&gt;So, using this method, we are doing more calculations up-front, but saving ourselves some entities to process in the long run.&lt;/P&gt;&lt;P&gt;You could even reduce the distance from 1/4 to 1/10 or less if you'd like. we need to find that balance between selecting too many objects, or not getting any objects in our selection set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this make sense? Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 22:20:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9332160#M78172</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-20T22:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9332334#M78173</link>
      <description>&lt;P&gt;Try this .. not sure if it's any faster than sorting all 10000 objects though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;(defun c:foo (/ a an ao b c d e i o r s tm)
  ;; RJP » 2020-02-20
  ;; Closest intersecting object on ray using fence
  (cond
    ((and (setq e (car (entsel "\nPick a ray: ")))
	  (= "RAY" (cdr (assoc 0 (entget e))))
	  (setq a (vlax-get (setq o (vlax-ename-&amp;gt;vla-object e)) 'basepoint))
	  (setq b (vlax-get o 'secondpoint))
	  (setq an (angle a b))
     )
     ;; This distance should be set per scenario
     (setq i (cond ((getdist "\nPick a distance to search &amp;lt;10&amp;gt;: "))
		   (10)
	     )
     )
     (vlax-invoke (setq ao (vlax-get-acad-object)) 'zoomcenter a i)
     (setq d 0)
     ;; Beware this could loop forever if nothing intersects .. need a check for max iterations or something.
     (while (or (null (setq s (ssget "_F" (list a b) '((0 . "~INSERT"))))) (= 1 (sslength s)))
       (setq b (polar a an (setq d (+ d i))))
       (vlax-invoke ao 'zoomcenter b i)
     )
     (ssdel e s)
     ;; If one result highlight
     (if (= 1 (sslength s))
       (redraw (ssname s 0) 3)
       ;; Else this mumbo jumbo :)
       (progn (setq
		s (foreach x (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
		    (if	(and (setq c (vlax-invoke o 'intersectwith (vlax-ename-&amp;gt;vla-object x) 1))
			     (= 3 (length c))
			)
		      (setq r (cons (list (distance a c) c x) r))
		      (progn
			(while c
			  (setq tm (cons (list (car c) (cadr c) (caddr c)) tm))
			  (setq c (cdddr c))
			)
			(setq tm (car (vl-sort tm '(lambda (r j) (&amp;lt; (distance a r) (distance a j))))))
			(setq r (cons (list (distance a tm) tm x) r))
		      )
		    )
		  )
	      )
	      (if (setq r (car (vl-sort r '(lambda (r j) (&amp;lt; (car r) (car j))))))
		(progn (redraw (last r) 3) (vlax-invoke ao 'zoomcenter (cadr r) i))
	      )
       )
     )
    )
  )
  (princ)
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2020 23:56:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9332334#M78173</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-02-20T23:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9333691#M78174</link>
      <description>&lt;P&gt;Well .. the results are in ... it's a bit faster than selecting all &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;. This can vary greatly based on the selection distance used though.&lt;/P&gt;&lt;PRE&gt;_$ 
_INTS 
_FOO 
_FOO2 Benchmarking ........Elapsed milliseconds / relative speed for 32 iteration(s):
    (_FOO E).......2046 / 45.33 &amp;lt;fastest&amp;gt;
    (_FOO2 E).....92750 / 1.00 &amp;lt;slowest&amp;gt;
_$ &lt;/PRE&gt;&lt;PRE&gt;(defun _ints (o1 o2 opt / p r)
  ;; RJP » 2020-02-21
  (and (setq p (vl-catch-all-apply 'vlax-invoke (list o1 'intersectwith o2 opt)))
       (= 'list (type p))
       (while p (setq r (cons (mapcar '+ p '(0 0 0)) r)) (setq p (cdddr p)))
  )
  r
)
(defun _foo (e / a an ao b c d e i o r s tm)
  ;; RJP » 2020-02-21
  ;; Closest intersecting object on ray using fence
  (cond
    ((and ;; (setq e (car (entsel "\nPick a ray: ")))
	  (= "RAY" (cdr (assoc 0 (entget e))))
	  (setq a (vlax-get (setq o (vlax-ename-&amp;gt;vla-object e)) 'basepoint))
	  (setq b (vlax-get o 'secondpoint))
	  (setq an (angle a b))
     )
     ;; This distance should be set per scenario
     (setq i 10)
     (vlax-invoke (setq ao (vlax-get-acad-object)) 'zoomcenter a i)
     (setq d 0)
     ;; Beware this could loop forever if nothing intersects .. need a check for max iterations or something.
     (while (or (null (setq s (ssget "_F" (list a b) '((0 . "~INSERT"))))) (= 1 (sslength s)))
       (setq b (polar a an (setq d (+ d i))))
       (vlax-invoke ao 'zoomcenter b i)
     )
     (ssdel e s)
     ;; If one result highlight
     (if (= 1 (sslength s))
       (redraw (ssname s 0) 3)
       ;; Else this mumbo jumbo :)
       (progn (foreach x (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
		(if (setq c (_ints o (vlax-ename-&amp;gt;vla-object x) 1))
		  (progn (setq c (car (vl-sort c '(lambda (r j) (&amp;lt; (distance a r) (distance a j))))))
			 (setq r (cons (list (distance a c) c x) r))
		  )
		)
	      )
	      (if (setq r (car (vl-sort r '(lambda (r j) (&amp;lt; (car r) (car j))))))
		(progn (redraw (last r) 3) (vlax-invoke ao 'zoomcenter (cadr r) i))
	      )
       )
     )
    )
  )
  (princ)
)
(defun _foo2 (e / a an ao b c o r s tm)
  ;; RJP » 2020-02-21
  ;; Closest intersecting object on ray using all
  (cond
    ((and ;;(setq e (car (entsel "\nPick a ray: ")))
	  (= "RAY" (cdr (assoc 0 (entget e))))
	  (setq a (vlax-get (setq o (vlax-ename-&amp;gt;vla-object e)) 'basepoint))
	  (setq b (vlax-get o 'secondpoint))
	  (setq an (angle a b))
     )
     (setq ao (vlax-get-acad-object))
     (if (and (setq s (ssget "_A" '((0 . "~INSERT") (0 . "~VIEWPORT")))) (ssdel e s))
       (progn (foreach x (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
		(if (setq c (_ints o (vlax-ename-&amp;gt;vla-object x) 1))
		  (progn (setq c (car (vl-sort c '(lambda (r j) (&amp;lt; (distance a r) (distance a j))))))
			 (and c (setq r (cons (list (distance a c) c x) r)))
		  )
		)
	      )
	      (if (setq r (car (vl-sort r '(lambda (r j) (&amp;lt; (car r) (car j))))))
		(progn (redraw (last r) 3) (vlax-invoke ao 'zoomcenter (cadr r) 10))
	      )
       )
     )
    )
  )
  (princ)
)
;;(setq e (car (entsel)))
;;(benchmark '((_foo e) (_foo2 e)))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:45:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9333691#M78174</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-02-21T15:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334305#M78175</link>
      <description>&lt;P&gt;How 'bout something like this?&lt;/P&gt;
&lt;PRE&gt;(defun C:&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Ray1st&lt;/STRONG&gt;&lt;/FONT&gt; (/ ray rdata base ang step inc)
  (setq
    ray (car (entsel "\nSelect Ray: "))
    rdata (entget ray)
    base (cdr (assoc 10 rdata))
    ang (angle '(0 0 0) (cdr (assoc 11 rdata)))
    step 1 &lt;FONT color="#00CCFF"&gt;;; &amp;lt;--- &lt;STRONG&gt;EDIT&lt;/STRONG&gt; reasonable-sized stepping increment in drawing units&lt;/FONT&gt;
    inc 0
    ss nil &lt;FONT color="#00CCFF"&gt;; [for subsequent runs -- not localized, for use after conclusion]&lt;/FONT&gt;
  ); setq
  (while (or (not ss) (= (sslength ss) 0))
    (setq ss (ssdel ray (ssget "_F" (list base (polar base ang (* step (setq inc (1+ inc))))))))
  ); while
  (sssetfirst nil ss)
)&lt;/PRE&gt;
&lt;P&gt;It steps along the Ray with Fence selection from its origin to the current step position, until it finds something more than the Ray itself, then it selects/grips/highlights that something, or possibly those somethings if in a single further step it finds more than one other thing.&amp;nbsp; That's why you should choose as small a step size as makes sense, in relation to the likely distances between things it might encounter.&amp;nbsp; If finding more than one thing happens frequently, it could be enhanced to then step in smaller increments from the last didn't-find-anything step location, until it gets a one-thing-only result.&amp;nbsp; But that will not always be possible -- the first place the Ray encounters something could be &lt;EM&gt;at the intersection&lt;/EM&gt;&amp;nbsp; of more than one other thing.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 20:05:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334305#M78175</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-02-21T20:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334321#M78176</link>
      <description>&lt;P&gt;Nice idea Kent .. like you say though, the step size is crucial to getting only one item. My test drawing is very small so it returned 2 items even with a step of 0.1.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":clinking_beer_mugs:"&gt;🍻&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 283px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/732744iAB196B3F8716BDB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*Edit ... do you know when AutoCAD started not requiring items to be on screen for point selections? I could remove all that zooming mumbo jumbo in my code above.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 20:15:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334321#M78176</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-02-21T20:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334488#M78177</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... it returned 2 items even with a step of 0.1. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suppose it could be altered so that if there's more than one thing the first time it finds anything, it could find all the intersection locations, and compare their distances from the Ray's origin to find the "first" one.&amp;nbsp; But there could still be more than one at the same place.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 21:23:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334488#M78177</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2020-02-21T21:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334551#M78178</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;*Edit ... do you know when AutoCAD started not requiring items to be on screen for point selections? I could remove all that zooming mumbo jumbo in my code above.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I remember 2018 when SELECTIONOFFSCREEN was added to ACAD.&amp;nbsp;&lt;A href="http://help.autodesk.com/view/ACD/2019/ENU/?guid=GUID-B93A458E-1A7F-4090-A8CF-87A31C24E404" target="_blank" rel="noopener"&gt;HERE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW Just recently I was thinking about this remark in&amp;nbsp;&lt;A href="http://help.autodesk.com/view/ACD/2019/ENU/?guid=GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3" target="_blank" rel="noopener"&gt;HELP&lt;/A&gt;&amp;nbsp; if still applies:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;When using the&amp;nbsp;&lt;SAMP id="GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3__GUID-FD71D518-3984-4C2C-ADE0-A6D58A1D5ECF" class="ph codeph"&gt;L&lt;/SAMP&gt;&amp;nbsp;selection method in an MDI environment, you cannot always count on the last object drawn to remain visible. For example, if your application draws a line, and the user subsequently minimizes or cascades the AutoCAD drawing window, the line may no longer be visible. If this occurs,&amp;nbsp;&lt;SAMP id="GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3__GUID-3A30BC20-3573-419F-96C9-C5BDC0104174" class="ph codeph"&gt;ssget&lt;/SAMP&gt;&amp;nbsp;with the&amp;nbsp;&lt;SAMP id="GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3__GUID-7A5E3CF1-975E-4DE3-8DAD-0017AF7797FF" class="ph codeph"&gt;"L"&lt;/SAMP&gt;&amp;nbsp;option will return&amp;nbsp;&lt;SAMP id="GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3__GUID-63CB1433-ACC0-4635-A375-5A652C973558" class="ph codeph"&gt;nil&lt;/SAMP&gt;.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Probably not.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Feb 2020 21:57:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334551#M78178</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2020-02-21T21:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334957#M78179</link>
      <description>&lt;P&gt;Thanks Kent, yeah making a fence selection and going by small steps until I actually find something was one of my first ideas, I was just hoping there's a smarter way to do so, but as dlanorh mentioned "&lt;SPAN&gt;AutoCAD is dumb.&lt;/SPAN&gt;". At least kinda.&lt;/P&gt;&lt;P&gt;Like the short code btw, will probably use it in the end.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 06:42:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9334957#M78179</guid>
      <dc:creator>davidkoh007</dc:creator>
      <dc:date>2020-02-22T06:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: First object intersected by a ray</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9337632#M78180</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7183096"&gt;@davidkoh007&lt;/a&gt;&amp;nbsp;FWIW you should also take a look at my solution &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9332334#M396255" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;HERE&lt;/STRONG&gt;&lt;/A&gt;. Kent's code is the shortest&amp;nbsp;but the code I posted should be more accurate ( does not return multiple items if the search distance is too large ) and you can specify your search distance.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 14:02:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/first-object-intersected-by-a-ray/m-p/9337632#M78180</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2020-02-24T14:02:25Z</dc:date>
    </item>
  </channel>
</rss>

