<?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 About assoc in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163797#M45702</link>
    <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi all.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;In the following code, the ent in line A is&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ent&lt;/SPAN&gt;&lt;SPAN&gt; = (-3 (&lt;/SPAN&gt;&lt;SPAN&gt;"XData"&lt;/SPAN&gt;&lt;SPAN&gt; (1040 . 90.0) (1040 . 4.1) (1070 . 1)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;I get an error on line B. What is wrong?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;What is wrong?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun _sort_panel ( ss / nn i id ent lay panel_list)
  (setq nn (sslength ss))
  (setq i 0)
  (repeat nn
    (setq id (ssname ss i))
    (setq ent (assoc -3 (entget id '("XData")))) ;A
    (setq ent (assoc 1070 ent)) ;B

  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 08:08:54 GMT</pubDate>
    <dc:creator>saitoib</dc:creator>
    <dc:date>2022-05-12T08:08:54Z</dc:date>
    <item>
      <title>About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163797#M45702</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi all.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;In the following code, the ent in line A is&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ent&lt;/SPAN&gt;&lt;SPAN&gt; = (-3 (&lt;/SPAN&gt;&lt;SPAN&gt;"XData"&lt;/SPAN&gt;&lt;SPAN&gt; (1040 . 90.0) (1040 . 4.1) (1070 . 1)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;I get an error on line B. What is wrong?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;What is wrong?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun _sort_panel ( ss / nn i id ent lay panel_list)
  (setq nn (sslength ss))
  (setq i 0)
  (repeat nn
    (setq id (ssname ss i))
    (setq ent (assoc -3 (entget id '("XData")))) ;A
    (setq ent (assoc 1070 ent)) ;B

  )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 08:08:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163797#M45702</guid>
      <dc:creator>saitoib</dc:creator>
      <dc:date>2022-05-12T08:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163826#M45703</link>
      <description>&lt;P&gt;(cdr ent) missing?&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 08:24:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163826#M45703</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-05-12T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Betreff: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163841#M45704</link>
      <description>&lt;P&gt;&lt;STRONG&gt;[Typos edited - the third time :-/]&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;after line a the value is ent = (-3 ("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;same list, another formatting:&lt;/P&gt;
&lt;P&gt;( -3&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1))&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you have 2 items inside and the list isn't a valid association list (a list with nested listes inside only)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: (&lt;STRONG&gt;cdr &lt;/STRONG&gt;(-3 ("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1))))&lt;/P&gt;
&lt;P&gt;(("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1)))&lt;/P&gt;
&lt;P&gt;Now, there are only ONE list inside, but the assoc-element is "xdata" - what you don't want.&lt;EM id="GUID-46309786-DAF6-4C28-8448-599FBC8A4F6A__GUID-D41C84A3-7393-4A4F-BE5F-DA588677E55A" class="ph i"&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command: (&lt;STRONG&gt;cadr&lt;/STRONG&gt; '(-3 ("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1))))&lt;BR /&gt;&amp;nbsp;("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1))&lt;/P&gt;
&lt;P&gt;Not only lists inside&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command:: (&lt;STRONG&gt;cdadr&lt;/STRONG&gt; '(-3 ("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1))))&lt;BR /&gt;((1040 . 90.0) (1040 . 4.1) (1070 . 1))&lt;/P&gt;
&lt;P&gt;Now, only lists inside (valid association list) and you can use ASSOC!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Command:: (assoc 1070 (cdadr '(-3 ("XData" (1040 . 90.0) (1040 . 4.1) (1070 . 1)))))&lt;BR /&gt;(1070 . 1)&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 13:13:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163841#M45704</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2022-05-12T13:13:24Z</dc:date>
    </item>
    <item>
      <title>Betreff: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163861#M45705</link>
      <description>&lt;P&gt;Removed.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 12 May 2022 09:03:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163861#M45705</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-05-12T09:03:04Z</dc:date>
    </item>
    <item>
      <title>Betreff: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163875#M45706</link>
      <description>&lt;P&gt;thx you, but I was faster &lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I had to edit my edit &amp;lt;crazy&amp;gt; &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 08:58:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11163875#M45706</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2022-05-12T08:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11164401#M45707</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/71745"&gt;@cadffm&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;BR /&gt;I understand now.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 13:09:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11164401#M45707</guid>
      <dc:creator>saitoib</dc:creator>
      <dc:date>2022-05-12T13:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11172766#M45708</link>
      <description>Please you upload a Sample.Dwg with entities + Xdata..&lt;BR /&gt;Can you share a your Drawing.dwg?</description>
      <pubDate>Mon, 16 May 2022 19:29:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11172766#M45708</guid>
      <dc:creator>diagodose2009</dc:creator>
      <dc:date>2022-05-16T19:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: About assoc</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11172999#M45709</link>
      <description>&lt;P&gt;Would this be of any help to you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 21:48:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/about-assoc/m-p/11172999#M45709</guid>
      <dc:creator>saitoib</dc:creator>
      <dc:date>2022-05-16T21:48:02Z</dc:date>
    </item>
  </channel>
</rss>

