<?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: How ChatGPT explained my Autolisp problem in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11939360#M3692</link>
    <description>&lt;BLOCKQUOTE&gt;That's why I shifted to 'vlax-ldata-put'.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;It seems like ChatGPT may ...&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's short of &lt;EM&gt;perfect&lt;/EM&gt; or it would have warned that in the transition from R14 to 2000 any LDATA&amp;nbsp;stored (in R14) was LOST (attempting to retrieve in 2000).&amp;nbsp; Hopefully history will never repeat itself on this one.&lt;/P&gt;</description>
    <pubDate>Wed, 03 May 2023 17:12:27 GMT</pubDate>
    <dc:creator>TerryDotson</dc:creator>
    <dc:date>2023-05-03T17:12:27Z</dc:date>
    <item>
      <title>How ChatGPT explained my Autolisp problem</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11937314#M3691</link>
      <description>&lt;P&gt;As long as it's available, I think I'll be asking ChatGPT my questions first before coming here.&amp;nbsp; It will even suggest code although it doesn't yet have a full knowledge of the limitations/differences in Autolisp vs LISP and VLX vs ActiveX.&amp;nbsp; It will suggest alternate code if told of the invalid functions it had used and asked to rewrite it.&lt;/P&gt;&lt;P&gt;I got on this track this morning when I asked ChatGPT to analyze my code and suggest improvements.&amp;nbsp; It replied that I could improve my code's speed and efficiency by using a dictionary instead of manipulating lists using MAPCAR, ASSOC, and NTH... and it wrote some code examples.&amp;nbsp; Now, my 'find-nearest-point' function gets applied to an alignment data dictionary and examines each point tuple in the 2588 lisp data items and finds the one closest to a given point.&amp;nbsp; It returns the result in a small fraction of a second.&amp;nbsp; The previous list processing method, using the same data set (a list of 2588 lists of 13 items each), takes at least 2 seconds to return the result.&amp;nbsp; I was stuck trying to understand why I could not use (VLAX-ITEM &amp;lt;dict&amp;gt; &amp;lt;key&amp;gt;)... so I asked ChatGPT.&amp;nbsp; It gives such informed answers and does so very quickly too!&amp;nbsp; I've found that the questions must be clear and complete.&amp;nbsp; Its responses will let me know if my question misses the mark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 'add' method could not put my data lists because they are too complex.&amp;nbsp; They don't look it to me but that was ChatGPT's assessment (the error said something about variants...) .&amp;nbsp;&amp;nbsp;That's why I shifted to 'vlax-ldata-put'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a typical data list item '("1" 0.0 442.448 430.951 0.0 0.01 (0 0 0) 8.0 (2 0 0 0) (1.88482e+06 496358.0 0.0) nil 0.0 nil)'&amp;nbsp; Some of my data lists have been over 4,000 items which begins to slow things down noticably.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like ChatGPT may be able to write some flawless code in a high level language like C# in .NET&lt;/P&gt;&lt;P&gt;I'm thinking I can learn to use C# much faster with ChatGPT's help.&amp;nbsp; I'll explore that more.&lt;/P&gt;&lt;P&gt;Here's my last interaction with ChatGPT:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vlax-ldata-put vs 'add method difference.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1209724iC1F2BC324E353B72/image-size/large?v=v2&amp;amp;px=999" role="button" title="vlax-ldata-put vs 'add method difference.jpg" alt="vlax-ldata-put vs 'add method difference.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 21:02:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11937314#M3691</guid>
      <dc:creator>hencoop</dc:creator>
      <dc:date>2023-05-02T21:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: How ChatGPT explained my Autolisp problem</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11939360#M3692</link>
      <description>&lt;BLOCKQUOTE&gt;That's why I shifted to 'vlax-ldata-put'.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;It seems like ChatGPT may ...&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's short of &lt;EM&gt;perfect&lt;/EM&gt; or it would have warned that in the transition from R14 to 2000 any LDATA&amp;nbsp;stored (in R14) was LOST (attempting to retrieve in 2000).&amp;nbsp; Hopefully history will never repeat itself on this one.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 17:12:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11939360#M3692</guid>
      <dc:creator>TerryDotson</dc:creator>
      <dc:date>2023-05-03T17:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How ChatGPT explained my Autolisp problem</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11939490#M3693</link>
      <description>&lt;P&gt;I have not been using ldata for much.&amp;nbsp; I make extensive use of LISPINIT=0 and SDI=1 so that all of my lisp data remains intact in a single session's memory as I move from drawing to drawing.&amp;nbsp; My method for storing my lisp data for the last&amp;nbsp; 30-years has been to write it to a text file.&amp;nbsp; I use (READ (READ-LINE ...)) on the file to retrieve my data and make it available in the current session.&amp;nbsp; Writing the data to a text file will continue, but manipulating that data as a list of lists may not continue if putting it in a dictionary as ldata makes it more efficient to retrieve, replace, and use the data... especially on large data sets.&amp;nbsp; I will need to rewrite lots of code to do that in all my routines.&amp;nbsp; That fact and that ChatGPT can write good code in multiple languages may help break my dependence upon Autolisp and help me learn and use other more efficient programming languages.&amp;nbsp; We'll see.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 18:10:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/how-chatgpt-explained-my-autolisp-problem/m-p/11939490#M3693</guid>
      <dc:creator>hencoop</dc:creator>
      <dc:date>2023-05-03T18:10:19Z</dc:date>
    </item>
  </channel>
</rss>

