<?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 malformed list on input in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12339938#M22440</link>
    <description>&lt;LI-CODE lang="general"&gt;(defun C:lM (/ searchString basept ss n totalTextEntities)
  ; Set the search string to "muthu"
  (setq searchString "muthu")

  ; Prompt the user to enter the base point
  (setq basept (getpoint "\nEnter base point for marking Lines: "))

  ; Initialize a variable to count the total number of text entities found
  (setq totalTextEntities 0)

  ; Iterate through the layers in the active document
  (vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
    ; Check if the layer name matches the search string using wildcards
    (if (wcmatch (vla-get-name lay) (strcat "*" searchString))
      (progn
        ; Get the selection set of text entities on the current layer
        (if (setq ss (ssget "_X" (list (cons 8 (vla-get-name lay)))))
          (progn
            ; Process each text entity found on the current layer
            (setq n (sslength ss))
            (repeat n
              (entmake
                (list
                  '(0 . "LINE")
                  (cons 10 basept)
                  (cons 11 (cdr (assoc 10 (entget (ssname ss (setq n (1- n))))))
                )
              )
            )
            ; Increment the total count of text entities found
            (setq totalTextEntities (+ totalTextEntities (sslength ss)))
          )
        )
      )
    )
  )

  ; Display the total count of text entities found
  (alert (strcat "Total text entities found: " (itoa totalTextEntities)))

  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;.i want serach layer name contain muthu string&amp;nbsp; count and find&amp;nbsp; mark&amp;nbsp; with line &lt;FONT color="#0000FF"&gt;error is&amp;nbsp;malformed list on input&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;how to solve this problem&lt;/FONT&gt;&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;</description>
    <pubDate>Mon, 30 Oct 2023 08:47:44 GMT</pubDate>
    <dc:creator>jaimuthu</dc:creator>
    <dc:date>2023-10-30T08:47:44Z</dc:date>
    <item>
      <title>malformed list on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12339938#M22440</link>
      <description>&lt;LI-CODE lang="general"&gt;(defun C:lM (/ searchString basept ss n totalTextEntities)
  ; Set the search string to "muthu"
  (setq searchString "muthu")

  ; Prompt the user to enter the base point
  (setq basept (getpoint "\nEnter base point for marking Lines: "))

  ; Initialize a variable to count the total number of text entities found
  (setq totalTextEntities 0)

  ; Iterate through the layers in the active document
  (vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
    ; Check if the layer name matches the search string using wildcards
    (if (wcmatch (vla-get-name lay) (strcat "*" searchString))
      (progn
        ; Get the selection set of text entities on the current layer
        (if (setq ss (ssget "_X" (list (cons 8 (vla-get-name lay)))))
          (progn
            ; Process each text entity found on the current layer
            (setq n (sslength ss))
            (repeat n
              (entmake
                (list
                  '(0 . "LINE")
                  (cons 10 basept)
                  (cons 11 (cdr (assoc 10 (entget (ssname ss (setq n (1- n))))))
                )
              )
            )
            ; Increment the total count of text entities found
            (setq totalTextEntities (+ totalTextEntities (sslength ss)))
          )
        )
      )
    )
  )

  ; Display the total count of text entities found
  (alert (strcat "Total text entities found: " (itoa totalTextEntities)))

  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;.i want serach layer name contain muthu string&amp;nbsp; count and find&amp;nbsp; mark&amp;nbsp; with line &lt;FONT color="#0000FF"&gt;error is&amp;nbsp;malformed list on input&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;how to solve this problem&lt;/FONT&gt;&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;</description>
      <pubDate>Mon, 30 Oct 2023 08:47:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12339938#M22440</guid>
      <dc:creator>jaimuthu</dc:creator>
      <dc:date>2023-10-30T08:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: malformed list on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12340120#M22441</link>
      <description>&lt;P&gt;The typical reason for "malformed list..." errors is mismatched or missing parentheses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first tool you need for serious programming in any language is an editor which immediately shows the corresponding opening parenthesis when you type the closing parenthesis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Working with Lisp is much easier if your editor also knows how to indent your program based on its structure. Professionals read the program structure by the indentation, the parentheses are for the compiler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the mainstream Lisp culture (Common Lisp, nowadays) most programmers use some variant of Emacs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is how GNU Emacs would indent your program:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun C:lM (/ searchString basept ss n totalTextEntities)
  (setq searchString "muthu")
  (setq basept (getpoint "\nEnter base point for marking Lines: "))
  (setq totalTextEntities 0)
  (vlax-for lay (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
            (if (wcmatch (vla-get-name lay) (strcat "*" searchString))
                (progn
                  (if (setq ss (ssget "_X" (list (cons 8 (vla-get-name lay)))))
                      (progn
                        (setq n (sslength ss))
                        (repeat n
                                (entmake
                                 (list
                                  '(0 . "LINE")
                                  (cons 10 basept)
                                  (cons 11 (cdr (assoc 10 (entget (ssname ss (setq n (1- n)))))))))
                                (setq totalTextEntities (+ totalTextEntities (sslength ss))))))))
            (alert (strcat "Total text entities found: " (itoa totalTextEntities)))
            (princ))&lt;/LI-CODE&gt;&lt;P&gt;- Your comments were superfluous: don't comment things any programmer can directly read in the program text, comment the things that are not shown: where did some outside data come from, what is the reason for some odd&lt;/P&gt;&lt;P&gt;program detail, what is the document detailing the requirement some detail implements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here the indentation shows something odd: did you really intend to write a separate report for found entities for every layer? Or was that intended to be outside the VLAX-FOR loop?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 10:16:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12340120#M22441</guid>
      <dc:creator>martti.halminen</dc:creator>
      <dc:date>2023-10-30T10:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: malformed list on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12340176#M22442</link>
      <description>&lt;P&gt;Regards&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2061372"&gt;@jaimuthu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You just needed to complete a parenthesis. And a slight correction for the text counter on the layer.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:lM (/ searchString basept ss n totalTextEntities)
  (setq searchString "muthu")
  (setq basept (getpoint "\nEnter base point for marking Lines: "))
  (setq totalTextEntities 0)
  (vlax-for lay
            (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
    (if (wcmatch (vla-get-name lay) (strcat "*" searchString))
      (progn
        (if (setq ss (ssget "_X" (list (cons 8 (vla-get-name lay)))))
          (progn
            (setq n (sslength ss))
            (repeat n
              (entmake
                (list
                  '(0 . "LINE")
                  (cons 10 basept)
                  (cons 11
                        (cdr (assoc 10 (entget (ssname ss (setq n (1- n))))))
                  )
                )
              )
;;;              (setq totalTextEntities (+ totalTextEntities (sslength ss)))
            )
          )
        )
      )
    )
  )
  (setq totalTextEntities (+ totalTextEntities (sslength ss)))
  (alert (strcat "Total text entities found: " (itoa totalTextEntities)))
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 10:51:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12340176#M22442</guid>
      <dc:creator>calderg1000</dc:creator>
      <dc:date>2023-10-30T10:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: malformed list on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12342339#M22443</link>
      <description>&lt;P&gt;Notepad++ is free and has bracket checking built in.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 04:35:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/malformed-list-on-input/m-p/12342339#M22443</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-10-31T04:35:42Z</dc:date>
    </item>
  </channel>
</rss>

