<?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: Need help to solve an error in lisp in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12445304#M20398</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10577275"&gt;@smallƑish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;...&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For example, if you select all 5 lines correctly, and the 6th line made a selection of 1st line (by mistake)&lt;STRONG&gt;(as per the attached gif the second time command run)&lt;/STRONG&gt; still you are getting back to user_osmode?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case you need to add &lt;STRONG&gt;*error*&lt;/STRONG&gt; function that will restore it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some example... note that *error* IS and NEEDS to be localized. Just the purple line is essential, the rest can always be the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note the structure...&lt;/P&gt;
&lt;P&gt;(if (and (pick first point...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (pick second point...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(pick third point...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (do stuff)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;... so it's doing the stuff only if the user sets all the points...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LMID ( / &lt;STRONG&gt;*error*&lt;/STRONG&gt; osm 1a 1b 1m 2a 2b 2m)
  
  (defun &lt;STRONG&gt;*error*&lt;/STRONG&gt; (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    &lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;(if osm (setvar 'osmode osm))&lt;/STRONG&gt;&lt;/FONT&gt;
    (princ))
  
  (setq osm (getvar 'osmode))
  (setvar 'osmode 512)
  
  (if (and (setq 1a (getpoint "\nPoint 1a: "))
	   (setq 1b (getpoint 1a "\nPoint 1b: "))
	   (setq 1m (mapcar '/ (mapcar '+ 1a 1b) '(2 2)))
	   (setq 2a (getpoint "\nPoint 2a: "))
	   (setq 2b (getpoint 2a "\nPoint 2b: "))
	   (setq 2m (mapcar '/ (mapcar '+ 2a 2b) '(2 2)))
	   )
    (progn
      (command "_.line" "_non" 1m "_non" 2m "")
      (princ "\n&amp;gt;&amp;gt; LINE")))
  (if osm (setvar 'osmode osm))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Dec 2023 11:33:25 GMT</pubDate>
    <dc:creator>ВeekeeCZ</dc:creator>
    <dc:date>2023-12-16T11:33:25Z</dc:date>
    <item>
      <title>Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444063#M20388</link>
      <description>&lt;P&gt;in this code, if the routine is canceling or stopped due to invalid values, the Object snap is getting 0. any solution to set back the osnap to user_osmode in all situations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:D2E ()
  (setq user_osmode (getvar"osmode"))
(setvar "osmode" 512)
(prompt "\nPick Outer Side of Main Duct: ")
(setq en1: (entsel))
(prompt "\nPick Inner Side of Main Duct: ")
(setq en2: (entsel))
(menucmd "s=numb_n")(SETQ CFM:M (GETREAL "\nMAIN CFM"))(menucmd "s=")
(prompt "\nPick Inner Side of FIRST Branch Duct: ")
(setq en3: (entsel))
(prompt "\nPick Outer Side of FIRST Branch Duct: ")
(setq en4: (entsel))
(menucmd "s=numb_n")(SETQ CFM:B1 (GETREAL "\nCFM of BRANCH 1: "))(menucmd "s=")
(prompt "\nPick INNER Side of SECOND Branch Duct: ")
(setq en5: (entsel))
(prompt "\nPick OUTER Side of SECOND Branch Duct: ")
(setq en6: (entsel))
(SETQ CFM:B2 (- cfm:m cfm:b1))
(setvar "osmode" 0)
(M:ELBOW EN1: EN2: EN3: EN4: CFM:B1 NIL r_o_d:1)
(SETQ LP:1 EN1:PP LP:A EN2:PP A:A A:1)
(COMMAND "LINE" LP:1 (POLAR LP:1 A:A  (- 1)) "") (SETQ EN?: (list (ENTLAST) LP:1))
(M:ELBOW EN1: EN?: EN5: EN6: CFM:M 1 r_o_d:2)
(SETQ LP:2 EN2:PP LP:B EN1:PP A:B A:1)
(SETQ &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; (DISTANCE LP:1 LP:2)
)(IF (/= &lt;span class="lia-unicode-emoji" title=":anguished_face:"&gt;😧&lt;/span&gt; 0)(PROGN
              (IF (= (ANGTOS (ANGLE LP:1 LP:2) 0 0) (ANGTOS  A:A 0 0))(COMMAND "PLINE" LP:1 (POLAR LP:A A:A D:) "")(COMMAND "PLINE" LP:1 (POLAR LP:B A:A D:) "")
              )
              )
 )
  (setvar "osmode" user_osmode)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 15 Dec 2023 17:05:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444063#M20388</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2023-12-15T17:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444090#M20389</link>
      <description>&lt;P&gt;This is what *error* handling is for.&amp;nbsp; Search for:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt;(defun *error*&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;in this Forum for many examples.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 17:16:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444090#M20389</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-12-15T17:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444142#M20390</link>
      <description>&lt;DIV style="font-size: 1.1em; font-family: 'ArtifaktElement'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10577275"&gt;@smallƑish&lt;/a&gt; - you can read all about.&amp;nbsp;&lt;A style="color: blue; border-bottom: 1px solid blue; font-weight: 300;" href="https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-027AD2E0-5AC5-48DA-B451-112B7EECE40F" target="_blank"&gt;error handling in autolisp here&lt;/A&gt;.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Dec 2023 17:35:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444142#M20390</guid>
      <dc:creator>rkmcswain</dc:creator>
      <dc:date>2023-12-15T17:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444269#M20391</link>
      <description>&lt;P&gt;Here, it is missing some variable and possibly more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(SETQ &lt;FONT color="#FF0000"&gt;&lt;EM&gt;some-variable-here&lt;/EM&gt;&lt;/FONT&gt; (DISTANCE LP:1 LP:2)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;(IF (/= 0)(PROGN&lt;BR /&gt;(IF (= (ANGTOS (ANGLE LP:1 LP:2) 0 0) (ANGTOS A:A 0 0))(COMMAND "PLINE" LP:1 (POLAR LP:A A:A D:) "")(COMMAND "PLINE" LP:1 (POLAR LP:B A:A D:) "")&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 18:34:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444269#M20391</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-12-15T18:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444300#M20392</link>
      <description>&lt;P&gt;tried, But not that&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 18:55:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444300#M20392</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2023-12-15T18:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444350#M20393</link>
      <description>&lt;P&gt;The syntax seems right. You need to provide a sample drawing and describe what should be selected and what values should be entered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:d2e ()
  (setq user_osmode (getvar"osmode"))
  (setvar "osmode" 512)
  
  (prompt "\npick outer side of main duct: ")
  (setq en1: (entsel))
  
  (prompt "\npick inner side of main duct: ")
  (setq en2: (entsel))
  
  (menucmd "s=numb_n")
  (setq cfm:m (getreal "\nmain cfm"))
  (menucmd "s=")
  
  (prompt "\npick inner side of first branch duct: ")
  (setq en3: (entsel))
  
  (prompt "\npick outer side of first branch duct: ")
  (setq en4: (entsel))
  
  (menucmd "s=numb_n")
  (setq cfm:b1 (getreal "\ncfm of branch 1: "))
  (menucmd "s=")
  
  (prompt "\npick inner side of second branch duct: ")
  (setq en5: (entsel))
  
  (prompt "\npick outer side of second branch duct: ")
  (setq en6: (entsel))
  
  (setq cfm:b2 (- cfm:m cfm:b1))
  (setvar "osmode" 0)
  
  (m:elbow en1: en2: en3: en4: cfm:b1 	nil 	r_o_d:1)
  
  (setq lp:1 en1:pp
	lp:a en2:pp
	a:a a:1)
  
  (command "line" lp:1 (polar lp:1 a:a  (- 1)) "")
  (setq en?: (list (entlast) lp:1))
  
  (m:elbow en1: en?: en5: en6: cfm:m 	1 	r_o_d:2)
  
  (setq lp:2 en2:pp
	lp:b en1:pp
	a:b a:1)
  (setq var (distance lp:1 lp:2))
  
  (if (/=  0)
    (progn
      (if (= (angtos (angle lp:1 lp:2) 0 0)
	     (angtos a:a 0 0)
	     )
	(command "pline" lp:1 (polar lp:a a:a d:) "")
	(command "pline" lp:1 (polar lp:b a:a d:) "")
	)
      )
    )
  (setvar "osmode" user_osmode)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 19:07:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444350#M20393</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-12-15T19:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444367#M20394</link>
      <description>&lt;P&gt;Please find attached&lt;/P&gt;&lt;P&gt;gif( for working)&lt;/P&gt;&lt;P&gt;complete lisp file&amp;nbsp;&lt;/P&gt;&lt;P&gt;and sample dwg&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vsdc-sr 2023-12-15 23-13-42.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1305369i831D95FD87C9C742/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vsdc-sr 2023-12-15 23-13-42.gif" alt="vsdc-sr 2023-12-15 23-13-42.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 19:20:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444367#M20394</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2023-12-15T19:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444579#M20395</link>
      <description>&lt;P&gt;Well, it works for me.&lt;/P&gt;
&lt;P&gt;Although... you should definitely start systematically localizing all the variables, add *error* function to make sure that you reset all the sysvars that you have touched, and somehow solve or remove all those first 20 lines that are not part of any defun.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you keep on programming with this mess, you'll see these flaws more and more often and never know what causes them and what interferes with what.&lt;/P&gt;
&lt;P&gt;Also, compare my formatting and your mess. Make your code nice and clean. It will help you see the issues more easily.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 21:23:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444579#M20395</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-12-15T21:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444894#M20396</link>
      <description>&lt;P&gt;My copy-paste attitude made the file a little mess. Please accept my apology.&lt;/P&gt;&lt;P&gt;I have a final question.&amp;nbsp;&lt;SPAN&gt;For example, if you select all 5 lines correctly, and the 6th line made a selection of 1st line (by mistake)&lt;STRONG&gt;(as per the attached gif the second time command run)&lt;/STRONG&gt; still you are getting back to user_osmode?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2 case (1).gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1305455i95699186DC8EC270/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2 case (1).gif" alt="2 case (1).gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 02:29:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12444894#M20396</guid>
      <dc:creator>smallƑish</dc:creator>
      <dc:date>2023-12-16T02:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12445114#M20397</link>
      <description>&lt;P&gt;Read my post Again &amp;amp; Again I think 3rd time I made a suggestion about dragging over the lines in sequence, stops the miss picks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If an administrator reads this, needs like the 3 separate posts to be merged into 1 so conflicting answers are not being provided.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 07:09:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12445114#M20397</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-12-16T07:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to solve an error in lisp</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12445304#M20398</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10577275"&gt;@smallƑish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;SPAN&gt;...&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For example, if you select all 5 lines correctly, and the 6th line made a selection of 1st line (by mistake)&lt;STRONG&gt;(as per the attached gif the second time command run)&lt;/STRONG&gt; still you are getting back to user_osmode?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that case you need to add &lt;STRONG&gt;*error*&lt;/STRONG&gt; function that will restore it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is some example... note that *error* IS and NEEDS to be localized. Just the purple line is essential, the rest can always be the same.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also note the structure...&lt;/P&gt;
&lt;P&gt;(if (and (pick first point...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (pick second point...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(pick third point...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; (do stuff)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;... so it's doing the stuff only if the user sets all the points...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LMID ( / &lt;STRONG&gt;*error*&lt;/STRONG&gt; osm 1a 1b 1m 2a 2b 2m)
  
  (defun &lt;STRONG&gt;*error*&lt;/STRONG&gt; (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    &lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;(if osm (setvar 'osmode osm))&lt;/STRONG&gt;&lt;/FONT&gt;
    (princ))
  
  (setq osm (getvar 'osmode))
  (setvar 'osmode 512)
  
  (if (and (setq 1a (getpoint "\nPoint 1a: "))
	   (setq 1b (getpoint 1a "\nPoint 1b: "))
	   (setq 1m (mapcar '/ (mapcar '+ 1a 1b) '(2 2)))
	   (setq 2a (getpoint "\nPoint 2a: "))
	   (setq 2b (getpoint 2a "\nPoint 2b: "))
	   (setq 2m (mapcar '/ (mapcar '+ 2a 2b) '(2 2)))
	   )
    (progn
      (command "_.line" "_non" 1m "_non" 2m "")
      (princ "\n&amp;gt;&amp;gt; LINE")))
  (if osm (setvar 'osmode osm))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2023 11:33:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-help-to-solve-an-error-in-lisp/m-p/12445304#M20398</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-12-16T11:33:25Z</dc:date>
    </item>
  </channel>
</rss>

