<?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: LISP routine stopped working in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13970055#M169272</link>
    <description>&lt;P&gt;Just another suggestion a lot of us use NOTEPAD++ its free and has a lot of good functions, when you save as a lsp file it will show your brackets and you can track down via color missing brackets, if you use ACAD you can download an extra add on "ActiveX Plugin" and run your code from Notepad++ a great feature. In image I have clicked on third line, the white brackets show a matched pair of brackets. you can say click on the very 1st line at the defun and scroll down looking for say missing close bracket in the master defun.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1767915271706.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1609335i29E8EFAAEA49573C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1767915271706.png" alt="SeaHaven_0-1767915271706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PS can have different color schemes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jan 2026 21:45:35 GMT</pubDate>
    <dc:creator>Sea-Haven</dc:creator>
    <dc:date>2026-01-09T21:45:35Z</dc:date>
    <item>
      <title>LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13968376#M169231</link>
      <description>&lt;P&gt;I am running CAD 2025, but the lisps I have were from 2026. There were a few minor changes I needed to make but overall everything was working fine.&lt;/P&gt;&lt;P&gt;All of a sudden, my master lisp file isn't working. For example, I have two lisps - TQP and TQP24. Only the first one will run.&lt;/P&gt;&lt;P&gt;Some lisp routines are singular (such as TWIST). However, it doesn't work if the lisp is in the master lsp file. If I copy and paste into its own .lsp and appload it will work. It's driving me nuts, I use this all the time.&lt;/P&gt;&lt;P&gt;See below - the end of one lisp to the beginning of the next one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;princ)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;****************************************************************************&lt;/DIV&gt;&lt;DIV&gt;; -----TW----- DVIEW TWIST&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;****************************************************************************&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;;;&amp;nbsp; LISP&amp;nbsp; uses two points or an input angle to&lt;/DIV&gt;&lt;DIV&gt;;;;&amp;nbsp; &amp;nbsp; twist the current view using the the dview command.&lt;/DIV&gt;&lt;DIV&gt;;;;&amp;nbsp; &amp;nbsp; the snapangle variable is reset to make the cursor&lt;/DIV&gt;&lt;DIV&gt;;;;&amp;nbsp; &amp;nbsp; appear horizontal.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;;;;The dtr funtion converts degrees to radians&lt;/DIV&gt;&lt;DIV&gt;;;;;The rtd funtion converts radians to degrees&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;(defun RTD (/ANG) (/ (* ANG 180.0) pi))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;(defun DTR (/ANG) (* pi (/ ANG 180.0)))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;(defun C:TW (/ P1 P2 ANG)&lt;/DIV&gt;&lt;DIV&gt;;;;&amp;nbsp; store the cmdecho, osnapcoord, osmode and orhtomode system varibles&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setq CE-SAV (getvar "cmdecho"))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setvar "cmdecho" 0)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setq OSCOORD-SAV (getvar "osnapcoord"))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setvar "osnapcoord" 1)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setq ORTHOMODE-SAV (getvar "orthomode"))&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setvar "orthomode" 0)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (princ&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; "\nTwist view and cursor angle by picking two point or entering an angle&lt;/DIV&gt;&lt;DIV&gt;"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; ) ; _ end ofPRINC&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (if (setq P2 (getpoint&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"\nFirst point(left) &amp;lt;Press Enter to input an angle&amp;gt;: "&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;) ; _ end of GETPOINT&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ) ;_ end of SETQ&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; (progn (initget 1)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;(setq P1&amp;nbsp; (getpoint "\nSecond point(right): " P2)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ANG (angle P2 P1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;) ;_ end of SETQ&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;(command "DVIEW" "L" "" "TW" (- 360 (RTD ANG)) "")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;(setvar "SNAPANG" ANG)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ) ;_&amp;nbsp; end of PROGN&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; (progn (setq ANG (getangle "\nAngle: "))&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;(command "DVIEW" "L" "" "TW" (- 360 (RTD ANG)) "")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;(setvar "SNAPANG" ANG)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ) ;_ end of PROGN&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; ) ;_&amp;nbsp; end of IF&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setvar "cmdecho" CE-SAV)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setvar "osnapcoord" OSCOORD-SAV)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (setvar "orthomode" ORTHOMODE-SAV)&lt;/DIV&gt;&lt;DIV&gt;;;; print the rotation angle to the screen:&amp;nbsp; converts string to local units&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; and&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; precision&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (princ&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; (strcat "\nTwist angle: "&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; (angtos ANG (getvar "aunits") (getvar "auprec"))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ) ;_ end of strcat&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; ) ;_ end of princ&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; (princ)&lt;/DIV&gt;&lt;DIV&gt;) ;_&amp;nbsp; end of DEFUN&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DRAWING OPENING ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;;;;THE FOLLOWING IS FOR TOPEN&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 20:11:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13968376#M169231</guid>
      <dc:creator>alaneZ8RDC</dc:creator>
      <dc:date>2026-01-07T20:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13968449#M169233</link>
      <description>&lt;P&gt;Like you said Twist works fine when loaded separately from the master lisp file.&lt;/P&gt;&lt;P&gt;Perhaps there's something in the master lisp file that fails preventing the defun c:TW from ever loading?&lt;/P&gt;&lt;P&gt;Could you attach the entire master lisp function here for examination?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 21:24:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13968449#M169233</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2026-01-07T21:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13968591#M169246</link>
      <description>&lt;P&gt;Do a (princ 1) ie (princ X) put it as 1st line in each C: defun that way you will see say 123456 and so on, can then see if a number is missing. Or (princ "\ndefuname") its an old fashioned way of finding where it gets to.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 00:21:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13968591#M169246</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2026-01-08T00:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969234#M169257</link>
      <description>&lt;P&gt;I use this method as well. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Examples:&lt;/P&gt;&lt;P&gt;(defun c:myfunction ()&lt;/P&gt;&lt;P&gt;(princ "\nTesting myfunction")&lt;/P&gt;&lt;P&gt;... the rest of the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:myotherfunction ()&lt;/P&gt;&lt;P&gt;(princ "\nTesting myotherfunction")&lt;/P&gt;&lt;P&gt;... the rest of the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This way, when something errors out I know where to look, which would be the last function name sent to the command line.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When debugging/developing I'll leave it uncommented, but when all is finished and running as designed, a simple find and replace "all" comments them all out:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Find:&lt;/P&gt;&lt;P&gt;(princ "\nTesting&lt;/P&gt;&lt;P&gt;Replace:&lt;/P&gt;&lt;P&gt;;(princ "\nTesting&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 12:34:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969234#M169257</guid>
      <dc:creator>DGCSCAD</dc:creator>
      <dc:date>2026-01-08T12:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969270#M169258</link>
      <description>&lt;P&gt;Thank you for the replies! I am going to try the numbering system and see if I can sus out the problem, but here is the master file in the meantime.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 13:10:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969270#M169258</guid>
      <dc:creator>alaneZ8RDC</dc:creator>
      <dc:date>2026-01-08T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969612#M169264</link>
      <description>&lt;P&gt;Attempting to load this lisp right away returns the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paullimapa_0-1767892309858.png" style="width: 753px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1609256i5D3C122B8CFA77F4/image-dimensions/753x32?v=v2" width="753" height="32" role="button" title="paullimapa_0-1767892309858.png" alt="paullimapa_0-1767892309858.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the lisp file you have a number of problems including:&lt;/P&gt;&lt;P&gt;1) princ functions missing open parenthesis&lt;/P&gt;&lt;P&gt;2) if function missing closing parenthesis&lt;/P&gt;&lt;P&gt;3) defun function&amp;nbsp;missing closing parenthesis&lt;/P&gt;&lt;P&gt;Whoever worked on this should not be allowed to do so again until they're using a lisp editor like Visual Studio Code which Autodesk recommends which provides a feature to check for matching parenthesis.&lt;/P&gt;&lt;P&gt;I cannot guarantee after all my adjustments made in the lisp will function but at least it now loads without error and TW does work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 17:12:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969612#M169264</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2026-01-08T17:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969702#M169265</link>
      <description>&lt;P&gt;Thank you for your help. I will look into the Visual Studio Code program.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 18:31:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969702#M169265</guid>
      <dc:creator>alaneZ8RDC</dc:creator>
      <dc:date>2026-01-08T18:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969703#M169266</link>
      <description>&lt;P&gt;you're welcome.... cheers!!!&lt;/P&gt;&lt;P&gt;PS: here's a post from Autodesk on VS Code:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-B1612444-8F27-44BF-8339-A556351C8842" target="_blank"&gt;https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-B1612444-8F27-44BF-8339-A556351C8842&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 18:32:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13969703#M169266</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2026-01-08T18:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13970055#M169272</link>
      <description>&lt;P&gt;Just another suggestion a lot of us use NOTEPAD++ its free and has a lot of good functions, when you save as a lsp file it will show your brackets and you can track down via color missing brackets, if you use ACAD you can download an extra add on "ActiveX Plugin" and run your code from Notepad++ a great feature. In image I have clicked on third line, the white brackets show a matched pair of brackets. you can say click on the very 1st line at the defun and scroll down looking for say missing close bracket in the master defun.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SeaHaven_0-1767915271706.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1609335i29E8EFAAEA49573C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SeaHaven_0-1767915271706.png" alt="SeaHaven_0-1767915271706.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PS can have different color schemes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2026 21:45:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13970055#M169272</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2026-01-09T21:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: LISP routine stopped working</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13970986#M169285</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; I'll look into that too.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jan 2026 15:42:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/lisp-routine-stopped-working/m-p/13970986#M169285</guid>
      <dc:creator>alaneZ8RDC</dc:creator>
      <dc:date>2026-01-09T15:42:13Z</dc:date>
    </item>
  </channel>
</rss>

