<?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: Programming Challenge No. 4 in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774497#M52019</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1637608530967"&gt;&lt;SPAN style="font-family: inherit;"&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;But then there's the Spline question -- ...&lt;SPAN style="font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;CORRECTION:&amp;nbsp; It wasn't 1024 [which is a power of 2 itself], but something larger, and I don't still have the same one to check again.&amp;nbsp; I don't know what I did wrong before, but I tried some more, and this does seem to work, accepting all those no-question object types, and planar Splines and both "heavy" and "lightweight" 2D Polylines, but &lt;EM&gt;not&lt;/EM&gt; non-planar Splines or 3D Polylines [even if planar].&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(sssetfirst nil
  (ssget "_X"
    '( ; filter list
      (-4 . "&amp;lt;OR")
        (0 . "LINE,LWPOLYLINE,CIRCLE,ARC,ELLIPSE,RAY,XLINE")
        (-4 . "&amp;lt;AND")
          (0 . "POLYLINE")
          (-4 . "&amp;lt;NOT") (-4 . "&amp;amp;") (70 . 88) (-4 . "NOT&amp;gt;"); not 3D [8] or mesh [16 &amp;amp; 64]
        (-4 . "AND&amp;gt;")
        (-4 . "&amp;lt;AND")
          (0 . "SPLINE") (-4 . "&amp;amp;") (70 . 8); planar
        (-4 . "AND&amp;gt;")
      (-4 . "OR&amp;gt;")
    ); filter list
  ); ssget
); sssetfirst&lt;/LI-CODE&gt;
&lt;P&gt;It's helpful to be able to find qualifying things at one shot like that within (ssget), rather than to accept selection of some things that &lt;EM&gt;don't&lt;/EM&gt; qualify, and then need to step through and check something [such as the Offsetting-available test] to disqualify them if appropriate and remove them from the selection.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Nov 2021 19:25:05 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2021-11-22T19:25:05Z</dc:date>
    <item>
      <title>Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10770713#M52006</link>
      <description>&lt;P&gt;Because of a recent post about offsetting inside/outside vs. left/right, your challenge is to write one (1) function that returns whether a given point is to the left or right of any curve.&lt;/P&gt;
&lt;P&gt;It must take two (2) arguments:&lt;/P&gt;
&lt;P&gt;p = point&lt;/P&gt;
&lt;P&gt;e = entity name&lt;/P&gt;
&lt;P&gt;It must return either&lt;/P&gt;
&lt;P&gt;+ = right, or&lt;/P&gt;
&lt;P&gt;- = left&lt;/P&gt;
&lt;P&gt;For the sake of brevity, you may declare other locals.&lt;/P&gt;
&lt;P&gt;I'm going to name mine LorR.&amp;nbsp; Another cool name would be +or-.&lt;/P&gt;
&lt;P&gt;I (or someone) will post an official test drawing later 'cause right now I have to go buy a Christmas tree with my wife and son, who has brought along a chain saw in case we want to cut our own.&amp;nbsp; She found a place about 35 minutes away that has Douglas Firs and Noble Firs grown on site, so the tree WILL be fresh as opposed to being trucked across the country from Oregon.&lt;/P&gt;</description>
      <pubDate>Sat, 20 Nov 2021 16:42:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10770713#M52006</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-20T16:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771077#M52007</link>
      <description>&lt;P&gt;Change 1:&lt;/P&gt;
&lt;P&gt;Your function must take two (2) arguments:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;handle = handle of entity already in the drawing&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;p = point&lt;/P&gt;
&lt;P&gt;Your function may still declare other locals.&lt;/P&gt;
&lt;P&gt;My timer function will be altered to test for each of the curve types in the drawing using the same point provided in the timer.&lt;/P&gt;
&lt;P&gt;I think the types will consist of one each of an Arc, Circle, Line, LWPolyline, Spline, Ray, Xline, and Ellipse.&amp;nbsp; Though I don't know about the Xline.&amp;nbsp; Like what direction is it going, the same as a pushmi-pullyu?&lt;/P&gt;
&lt;P&gt;All will be 2D in the WCS.&lt;/P&gt;
&lt;P&gt;I will try to make it so the last output for each timer will look something like...&lt;/P&gt;
&lt;P&gt;(+ - + + - - + -)&lt;/P&gt;
&lt;P&gt;Let's hope you all get the same result (and that mine matches too).&lt;/P&gt;
&lt;P&gt;VELOCITAS VINCINT OMNIA&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 00:02:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771077#M52007</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-21T00:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771084#M52008</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;It must return either&lt;/P&gt;
&lt;P&gt;+ = right, or&lt;/P&gt;
&lt;P&gt;- = left&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;In what form?&amp;nbsp; As a text string "+" or "-"?&amp;nbsp; As the AutoLisp function somehow, such as applied in some longer code?&amp;nbsp; Something else?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 00:14:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771084#M52008</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-11-21T00:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771198#M52009</link>
      <description>&lt;P&gt;1st choice&lt;/P&gt;&lt;LI-CODE lang="general"&gt;; left or right by Lee-mac.com

(defun ISL-R ( / ent pnt cpt der )
(if (and (setq ent (car (entsel)))
             (setq pnt (getpoint "\nPoint: "))
        )
		(progn
		(setq pnt (trans pnt 1 0))
    (setq cpt (vlax-curve-getclosestpointto ent pnt)
          der (vlax-curve-getfirstderiv ent (vlax-curve-getparamatpoint ent cpt))
    )
    (if (minusp (sin (- (angle cpt pnt) (angle '(0.0 0.0) der))))
        (princ "\nPoint is on the right.")
        (princ "\nPoint is on the left.")
    )
    (princ)
)
)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 21 Nov 2021 02:46:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771198#M52009</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-11-21T02:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771227#M52010</link>
      <description>&lt;P&gt;Similar request&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-offset-directions/td-p/1705849" target="_blank"&gt;vla-Offset directions - Autodesk Community - AutoCAD&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Nov 2021 03:38:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10771227#M52010</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2021-11-21T03:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10772385#M52011</link>
      <description>The actual function symbols + or -</description>
      <pubDate>Sun, 21 Nov 2021 22:42:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10772385#M52011</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-21T22:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10772515#M52012</link>
      <description>&lt;P&gt;@lee-mac&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(also&amp;nbsp;@ronjonp, @pbejse, @doaiena, @hak_vz, @dbroad, et al.)&lt;/P&gt;
&lt;P&gt;Please read the instructions again.&lt;/P&gt;
&lt;P&gt;Your function is to take two (2) arguments:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; handle (it will be provided in the Challenge4.lsp file&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; p (a point which will also be provided in the Challenge4.lsp file&lt;/P&gt;
&lt;P&gt;It should return either the + or - function names literally, not as strings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully, I will have successfully posted both Challenge4.lsp and Challenge4.dwg (notice, Ron, there is no # character).&lt;/P&gt;
&lt;P&gt;Please read the Challenge4.lsp file as it contains instructions for use and the timer and c:TEST functions so you can do your own testing.&amp;nbsp; It also contains my 1st attempt for which I would be flattered if you improved upon it.&lt;/P&gt;
&lt;P&gt;Please name your functions uniquely. perhaps with your initials as a suffix (as I did).&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 01:00:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10772515#M52012</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-22T01:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10773958#M52013</link>
      <description>&lt;P&gt;I guess I should have explained better.&lt;/P&gt;
&lt;P&gt;This function is not just for a challenge exercise.&lt;/P&gt;
&lt;P&gt;It could be used by someone who prefers the use of vla-offset vs. (command "_.OFFSET" ...).&lt;/P&gt;
&lt;P&gt;That way the programmer could determine the offset by...&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq sign (fun_name e p))
(setq offset (sign offset))&lt;/LI-CODE&gt;
&lt;P&gt;In that usage it wouldn't take a handle as input but rather an ename.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As an exercise, especially for timing, it must take a handle of an entity already in the drawing so that we can compare our functions on an even basis.&lt;/P&gt;
&lt;P&gt;Notice in the Challenge4.lsp file I listed all the applicable handles, one for each object type that could be offset.&lt;/P&gt;
&lt;P&gt;Um, are there any other object types that can be offset that I am missing?&amp;nbsp; I'd say nevermind 2DPolylines 'cause they are just old, BUT, wait a second, a splined or fit-curved LW becomes a 2DPolyline, which you can offset, so maybe I will add them.&amp;nbsp; Whaddya think?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 15:43:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10773958#M52013</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-22T15:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774018#M52014</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;....&amp;nbsp; I'd say nevermind 2DPolylines 'cause they are just old, BUT, wait a second, a splined or fit-curved LW becomes a 2DPolyline, which you can offset, so maybe I will add them.&amp;nbsp; Whaddya think?&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think they should be included, since they can be Offset.&amp;nbsp; But since they share an entity type name [e.g. for (ssget) filter-list purposes] with &lt;EM&gt;3D&lt;/EM&gt; Polylines which &lt;EM&gt;cannot&lt;/EM&gt; be Offset even if they're planar, some check needs to be built in to avoid those while still allowing "heavy" 2D Polylines.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 16:05:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774018#M52014</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-11-22T16:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774114#M52015</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&lt;BR /&gt;Thank you for your response.&lt;BR /&gt;For real use the 3D vs. 2D check should/must be made before the function is&lt;BR /&gt;called, thus providing the function an applicable ename.&lt;BR /&gt;One could check the 70 code, or one could check the ObjectName, or one&lt;BR /&gt;could check if the Offset method is applicable-p.&lt;BR /&gt;For this exercise I am not including nonapplicable entities, so no check is&lt;BR /&gt;required within the function.&lt;BR /&gt;I will post new files.</description>
      <pubDate>Mon, 22 Nov 2021 16:36:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774114#M52015</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-22T16:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774296#M52016</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;....One could check the 70 code....&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This seems to work to find and highlight Offsettable objects [including Splines, but see below] based on that [super-minimally tested]:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;(sssetfirst nil&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (ssget "_X"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; '(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "&amp;lt;OR")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (0 . "LINE,LWPOLYLINE,CIRCLE,ARC,RAY,XLINE,SPLINE")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "&amp;lt;AND")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (0 . "POLYLINE")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "&amp;lt;NOT") (-4 . "&amp;amp;") (70 . 88) (-4 . "NOT&amp;gt;"); not 3D [8] or mesh [16 &amp;amp; 64]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "AND&amp;gt;")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "OR&amp;gt;")&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; ); filter list&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ); ssget&lt;/P&gt;
&lt;P&gt;); sssetfirst&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But then there's the Spline question -- non-planar ones can't be Offset.&amp;nbsp; I looked up the 70-code entry for those, which lists bit codes up to 16, of which the presence of 8 means it's planar.&amp;nbsp; But I drew a &lt;EM&gt;non&lt;/EM&gt;-planar Spline, and checked its entity data, and it has a DXF-70 value of &lt;STRONG&gt;1024&lt;/STRONG&gt;!&amp;nbsp; I'm not sure what to make of that, since [apart from the fact that &lt;EM&gt;all&lt;/EM&gt; the listed bit values add up to only 31] 8 &lt;EM&gt;is&lt;/EM&gt; a bit-code ingredient of 1024.&amp;nbsp; So when I took SPLINE out of the first list of entity types and put in code to check for planar Splines only [inside the OR wrapping]:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "&amp;lt;AND")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (0 . "SPLINE") (-4 . "&amp;amp;") (70 . 8); planar&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; (-4 . "AND&amp;gt;")&lt;/P&gt;
&lt;P&gt;it "saw" that Spline, even though it is &lt;EM&gt;not&lt;/EM&gt; planar.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 17:53:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774296#M52016</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-11-22T17:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774328#M52017</link>
      <description>That's pretty good research and work, Kent.&lt;BR /&gt;Looks like you have found a new AutoCAD "feature."&lt;BR /&gt;I could say that I don't care because it's not pertinent to the&lt;BR /&gt;Left-or-Right function, but I do care, so maybe the&lt;BR /&gt;(vlax-method-applicable-p object 'Offset) is the best vetting mechanism for&lt;BR /&gt;weeding out nonqualified objects.  Fortunately for me, I have never dealt&lt;BR /&gt;with nor plan ever to deal with a non-planar spline.  Except if you can&lt;BR /&gt;treat it sorta like a 3D polyline, then it might be valuable for some more&lt;BR /&gt;realistic grading lines.</description>
      <pubDate>Mon, 22 Nov 2021 18:09:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774328#M52017</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-22T18:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774362#M52018</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/411413"&gt;@dbroad&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&amp;nbsp;@hak_vz,&amp;nbsp;@ronjonp,&amp;nbsp;@doaiena, et al,&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;(Sorry BeekeeCZ, I can never remember your new ID.)&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Based on&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;'s suggestion I have revised the Challenge4.dwg and Challenge4.lsp files to include a Fit-curved 2D poly and a Splined 2D poly.&lt;/P&gt;
&lt;P&gt;Please read messages #9, 10, 11, and 12.&lt;/P&gt;
&lt;P&gt;Please use the new attached files in place of the old.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 18:31:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774362#M52018</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-22T18:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774497#M52019</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:
&lt;P class="1637608530967"&gt;&lt;SPAN style="font-family: inherit;"&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;But then there's the Spline question -- ...&lt;SPAN style="font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;CORRECTION:&amp;nbsp; It wasn't 1024 [which is a power of 2 itself], but something larger, and I don't still have the same one to check again.&amp;nbsp; I don't know what I did wrong before, but I tried some more, and this does seem to work, accepting all those no-question object types, and planar Splines and both "heavy" and "lightweight" 2D Polylines, but &lt;EM&gt;not&lt;/EM&gt; non-planar Splines or 3D Polylines [even if planar].&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(sssetfirst nil
  (ssget "_X"
    '( ; filter list
      (-4 . "&amp;lt;OR")
        (0 . "LINE,LWPOLYLINE,CIRCLE,ARC,ELLIPSE,RAY,XLINE")
        (-4 . "&amp;lt;AND")
          (0 . "POLYLINE")
          (-4 . "&amp;lt;NOT") (-4 . "&amp;amp;") (70 . 88) (-4 . "NOT&amp;gt;"); not 3D [8] or mesh [16 &amp;amp; 64]
        (-4 . "AND&amp;gt;")
        (-4 . "&amp;lt;AND")
          (0 . "SPLINE") (-4 . "&amp;amp;") (70 . 8); planar
        (-4 . "AND&amp;gt;")
      (-4 . "OR&amp;gt;")
    ); filter list
  ); ssget
); sssetfirst&lt;/LI-CODE&gt;
&lt;P&gt;It's helpful to be able to find qualifying things at one shot like that within (ssget), rather than to accept selection of some things that &lt;EM&gt;don't&lt;/EM&gt; qualify, and then need to step through and check something [such as the Offsetting-available test] to disqualify them if appropriate and remove them from the selection.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 19:25:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774497#M52019</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-11-22T19:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774575#M52020</link>
      <description>That's great, Kent, but losing a few milliseconds doesn't bother me very&lt;BR /&gt;much.  If I were stepping through and checking things manually, then yes,&lt;BR /&gt;the filter would be critical.&lt;BR /&gt;Seriously, if what you have there really does the job, then it's important&lt;BR /&gt;for us all to know and use it.</description>
      <pubDate>Mon, 22 Nov 2021 19:52:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10774575#M52020</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-22T19:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777173#M52021</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;A href="http://@unnamed-smart-guy" target="_blank" rel="noopener"&gt;@unnamed-smart-guy&lt;/A&gt;&amp;nbsp;&amp;nbsp;wrote:&lt;BR /&gt;&lt;SPAN&gt;The offset method does not support RAYs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just re-posting a quick note.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 18:37:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777173#M52021</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-11-23T18:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777220#M52022</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1779365"&gt;@ВeekeeCZ&lt;/a&gt;&lt;BR /&gt;Woudja look at that!&lt;BR /&gt;Yet the Offset command does.&lt;BR /&gt;I guess the Autodesk programmers have better tools than the toothless saws&lt;BR /&gt;they give us to use.&lt;BR /&gt;No wonder Kent likes the command function so much.</description>
      <pubDate>Tue, 23 Nov 2021 18:50:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777220#M52022</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-23T18:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777309#M52023</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3930636"&gt;@john.uhden&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Because of a recent post about&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt; offsetting&lt;/STRONG&gt; &lt;/FONT&gt;inside/outside vs. left/right, your challenge is to &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;write one&lt;/STRONG&gt;&lt;/FONT&gt; (1) &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;function&lt;/FONT&gt;&lt;/STRONG&gt; that returns whether a &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;given point&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;is to the left or right of any curve&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;It must return either&lt;/P&gt;
&lt;P&gt;+ = right, or&lt;/P&gt;
&lt;P&gt;- = left&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;A href="http://@unnamed-smart-guy" target="_blank" rel="noopener"&gt;@unnamed-smart-guy&lt;/A&gt;&amp;nbsp;&amp;nbsp;wrote:&lt;BR /&gt;&lt;SPAN&gt;The function you challenge us to write is in no relation to the vlax-offset method. While for LINEs and XLINEs your 'LorR-JFU func returns the correct sign for point-to-curve relation, the vlax-offset method offsets object to the opposite direction. See your drawing, greens are good, reds are bad.&lt;/SPAN&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just re-posting another quick note.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 19:31:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777309#M52023</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2021-11-23T19:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777369#M52024</link>
      <description>&lt;P&gt;Well, I put a routine called LvsR-KC into the copy of Challenge4.lsp attached.&amp;nbsp; But when I run TEST, I get:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: TEST&lt;BR /&gt;*** LORR-JFU ***&lt;BR /&gt;Results: ((ARC -) (LINE +) (CIRCLE -) (ELLIPSE -) (LWPOLYLINE +) (SPLINE +) (RAY +) (XLINE -) (Fit Curved 2D +) (Spline Curved 2D -))&lt;BR /&gt;Elapsed time for 10000 iterations of all 8 handles: 2766 millisecs.&lt;BR /&gt;*** LVSR-KC ***&lt;FONT color="#FF0000"&gt;; error: bad argument value: positive 0&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the same error if I try the (timer) function with mine alone:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: (timer 'LvsR-KC 10000)&lt;/P&gt;
&lt;P&gt;*** LVSR-KC ***&lt;FONT color="#FF0000"&gt;; error: bad argument value: positive 0&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yet my routine works on its own if I set a handle and a point and feed them in:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Command: (setq handle (cdr (assoc 5 (entget (car (entsel))))))&lt;/P&gt;
&lt;P&gt;Select object: "36" &lt;FONT color="#00CCFF"&gt;[I picked the Ray]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Command: (setq p (getpoint)) &lt;FONT color="#00CCFF"&gt;[I picked a point to the &lt;FONT color="#0000FF"&gt;right&lt;/FONT&gt; of the Ray's direction]&lt;/FONT&gt;&lt;BR /&gt;(13.9238 8.8005 0.0)&lt;/P&gt;
&lt;P&gt;Command: (LvsR-KC handle p)&lt;BR /&gt;&lt;FONT size="4" color="#0000FF"&gt;&lt;STRONG&gt;+&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm wondering whether it's something in the (timer) function.&amp;nbsp; I don't know what "positive 0" signifies, but if that means it's looking for a positive number but being given 0 instead, I don't see any candidates for the function that could be triggering such an error, in either your code or mine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 19:47:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777369#M52024</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2021-11-23T19:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Programming Challenge No. 4</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777573#M52025</link>
      <description>&lt;P&gt;It's a disconnect between what the timer expects and what your function returns.&lt;/P&gt;
&lt;P&gt;The timer expects just + [#&amp;lt;SUBR @0000027c9313fba8 +&amp;gt;]&lt;/P&gt;
&lt;P&gt;Your function returns '+&lt;/P&gt;
&lt;P&gt;I like your approach better, but I'm not changing horses midstream for the sake of the others (if there are any).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, you had better look to see what happens when Adir = 10° and AtoP = 280°&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 21:02:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/programming-challenge-no-4/m-p/10777573#M52025</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2021-11-23T21:02:56Z</dc:date>
    </item>
  </channel>
</rss>

