<?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: bad SSGET List Error in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547918#M38272</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Sir,&lt;/P&gt;&lt;P&gt;Still problems exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a simple code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun Sel( EntName LayerName / ss)&lt;BR /&gt;(if(setq ss (ssget "x" (list (cons 0 EntName) (cons 8 LayerName))))&lt;/P&gt;&lt;P&gt;(princ "found")&lt;BR /&gt;(princ " not found")&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(defun c:xx ( / )&lt;BR /&gt;(Sel "TEXT" "KTHViewBounds")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;returns&amp;nbsp;" error"&lt;/P&gt;&lt;P&gt;Something goes on errorly&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;</description>
    <pubDate>Sat, 12 Nov 2022 13:15:40 GMT</pubDate>
    <dc:creator>GeryKnee</dc:creator>
    <dc:date>2022-11-12T13:15:40Z</dc:date>
    <item>
      <title>bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547403#M38269</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the following :::&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun ssAllObjOnLayer ( EntName LayerName / )&lt;BR /&gt;(ssget "x" (list '(0 . EntName) (cons 8 LayerName)))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(defun SelectTheSingleObjectOnLayer( EntName LayerName / ss)&lt;BR /&gt;(if(AND(setq ss (ssAllObjOnLayer EntName LayerName))&lt;BR /&gt;(= ((sslength ss) 1)))&lt;BR /&gt;(sssetfirst nil ss)&lt;BR /&gt;)&lt;BR /&gt;ss&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(defun c:xx ( / )&lt;BR /&gt;;;(DeselectAll)&lt;BR /&gt;(SelectTheSingleObjectOnLayer "TEXT" "KTHViewBounds")&lt;BR /&gt;(princ)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;causes a&amp;nbsp;bad SSGET List Error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Needs Correction&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 02:12:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547403#M38269</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-11-12T02:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547457#M38270</link>
      <description>&lt;P&gt;Since EntName is a symbol just like LayerName, then you have to use cons:&lt;/P&gt;&lt;P&gt;(ssget "x" (list (cons 0 EntName) (cons 8 LayerName)))&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 03:23:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547457#M38270</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-11-12T03:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547543#M38271</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;..causes a&amp;nbsp;bad SSGET List Error&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;Hi Gerry&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;The quote(') symbol treats the expression as it is written, so this line&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(list '(0 . EntName) (cons 8 LayerName))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;will result to&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;((0 . ENTNAME) (8 . "KTHViewBounds"))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;the list reads the variable ENTAME literally, DXF 0 requires a string, hence the error&amp;nbsp;&lt;SPAN&gt;bad SSGET List&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;The line should be like this&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(ssget "x" (list (cons  0 EntName) (cons 8 LayerName)))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;using cons to create a dotted pair.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;Also this line at&amp;nbsp;SelectTheSingleObjectOnLayer sub-function&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(= ((sslength ss) 1))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;will result&amp;nbsp; "error: bad function", lisp will evaluate the &lt;EM&gt;(sslength&amp;nbsp; ss)&lt;/EM&gt; as a local function, it should be written as&lt;/FONT&gt;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(= (sslength ss) 1)&lt;/LI-CODE&gt;
&lt;P&gt;"=" as the function and&amp;nbsp;&lt;EM&gt;(sslength ss)&lt;/EM&gt; and &lt;EM&gt;1&lt;/EM&gt; as the arguments&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 05:13:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547543#M38271</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2022-11-12T05:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547918#M38272</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello Sir,&lt;/P&gt;&lt;P&gt;Still problems exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a simple code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(defun Sel( EntName LayerName / ss)&lt;BR /&gt;(if(setq ss (ssget "x" (list (cons 0 EntName) (cons 8 LayerName))))&lt;/P&gt;&lt;P&gt;(princ "found")&lt;BR /&gt;(princ " not found")&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(defun c:xx ( / )&lt;BR /&gt;(Sel "TEXT" "KTHViewBounds")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;returns&amp;nbsp;" error"&lt;/P&gt;&lt;P&gt;Something goes on errorly&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 13:15:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547918#M38272</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-11-12T13:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547933#M38273</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;returns&amp;nbsp;" error"&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Surely that isn't all it says.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 13:27:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547933#M38273</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-11-12T13:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547991#M38274</link>
      <description>&lt;P&gt;Thank you sir&lt;/P&gt;&lt;P&gt;So please let me know,&lt;/P&gt;&lt;P&gt;how could this return an ss containing all entities&lt;/P&gt;&lt;P&gt;named EntName laying on layer LayerName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Gery&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 14:10:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11547991#M38274</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-11-12T14:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11548105#M38275</link>
      <description>&lt;P&gt;I modified your code so that it actually returns &lt;STRONG&gt;ss&lt;/STRONG&gt; after running subfunction &lt;STRONG&gt;Sel&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;defun&lt;/SPAN&gt;&lt;SPAN&gt; Sel( EntName LayerName / ss)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;setq&lt;/SPAN&gt;&lt;SPAN&gt; ss (&lt;/SPAN&gt;&lt;SPAN&gt;ssget&lt;/SPAN&gt; &lt;SPAN&gt;"x"&lt;/SPAN&gt;&lt;SPAN&gt; (&lt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&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Now at the Command prompt type:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(setq ss (c:xx))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Selection set if found will now be set to &lt;STRONG&gt;ss&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Then you can check using &lt;STRONG&gt;LIST&lt;/STRONG&gt; command then enter &lt;STRONG&gt;!ss&lt;/STRONG&gt; at command prompt to see Text objects selected.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 12 Nov 2022 15:51:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11548105#M38275</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2022-11-12T15:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11548200#M38276</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2354030"&gt;@GeryKnee&lt;/a&gt;&amp;nbsp;wrote:
&lt;P&gt;.. returns&amp;nbsp;" error"..&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What you posted there wouldn't even produce an error regardless the object is found or not, unless you still running the previous version of (c:XX).&amp;nbsp; Make sure you load the latest and correct function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 17:18:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11548200#M38276</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2022-11-12T17:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: bad SSGET List Error</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11548384#M38277</link>
      <description>&lt;P&gt;Sorry.&lt;/P&gt;&lt;P&gt;The problem was that "KTH" part of layername in document was written with greek chars.&lt;/P&gt;&lt;P&gt;These chars have the same shape as UK Chars.&lt;/P&gt;&lt;P&gt;So, realy, the layer named&amp;nbsp;"Z-KTHViewBounds" didn't exist (existed "Z-ΚΤΗViewBounds"&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;Gery.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Nov 2022 20:42:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/bad-ssget-list-error/m-p/11548384#M38277</guid>
      <dc:creator>GeryKnee</dc:creator>
      <dc:date>2022-11-12T20:42:15Z</dc:date>
    </item>
  </channel>
</rss>

