<?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: keep only highest value text in selected text. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11413140#M41158</link>
    <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Another way using AutoLISP vanilla.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:Test (/ int sel ent num big del)
  ;; Tharwat - Date: 10.Sep.2022	;;
  (and (princ "\nSelect texts : ")
       (setq int -1 sel (ssget "_:L" '((0 . "TEXT,MTEXT") (1 . "*#*"))))
       (while (setq int (1+ int) ent (ssname sel int))
         (or (and (setq num (distof (cdr (assoc 1 (entget ent)))))
                  (&amp;gt; num big)
                  (if del (entdel del) t)
                  (setq big num del ent)
                  )
             (entdel ent)
             )
         )
       )
  (princ)
  )&lt;/LI-CODE&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>Sat, 10 Sep 2022 15:13:17 GMT</pubDate>
    <dc:creator>_Tharwat</dc:creator>
    <dc:date>2022-09-10T15:13:17Z</dc:date>
    <item>
      <title>keep only highest value text in selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11412722#M41155</link>
      <description>&lt;P&gt;Hello, I have so many bunches of text and want to keep only the highest value in it. can anyone suggest to me the lisp for the same? thank you in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 06:17:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11412722#M41155</guid>
      <dc:creator>ravi82sharm</dc:creator>
      <dc:date>2022-09-10T06:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: keep only highest value text in selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11412936#M41156</link>
      <description>&lt;P&gt;Since you didn't&amp;nbsp; provided sample dwg here is code that works with selected text without filtering. Let suppose all selected text&amp;nbsp; has numerical values. To use this code move text entities aside or leave only this layer on.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:maxvaluetext ( / ss i lst)
	(setq  i -1 ss (ssget '((0 . "*text"))))
	(cond 
		((and ss)
			(while (&amp;lt; (setq i (1+ i)) (sslength ss))
				(setq lst (cons (list (atof(cdr(assoc 1 (entget (ssname ss i))))) (ssname ss i)) lst))
			)
			(mapcar 'entdel (mapcar 'cadr (cdr (vl-sort lst '(lambda (x y) (&amp;gt; (car x)(car y)))))))
		)
	)
	(princ)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 10 Sep 2022 11:30:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11412936#M41156</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2022-09-10T11:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: keep only highest value text in selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11412947#M41157</link>
      <description>&lt;P&gt;thank you it works. yes all values are numeric.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Sep 2022 11:46:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11412947#M41157</guid>
      <dc:creator>ravi82sharm</dc:creator>
      <dc:date>2022-09-10T11:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: keep only highest value text in selected text.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11413140#M41158</link>
      <description>&lt;P&gt;&lt;FONT face="georgia,palatino" size="4"&gt;Another way using AutoLISP vanilla.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:Test (/ int sel ent num big del)
  ;; Tharwat - Date: 10.Sep.2022	;;
  (and (princ "\nSelect texts : ")
       (setq int -1 sel (ssget "_:L" '((0 . "TEXT,MTEXT") (1 . "*#*"))))
       (while (setq int (1+ int) ent (ssname sel int))
         (or (and (setq num (distof (cdr (assoc 1 (entget ent)))))
                  (&amp;gt; num big)
                  (if del (entdel del) t)
                  (setq big num del ent)
                  )
             (entdel ent)
             )
         )
       )
  (princ)
  )&lt;/LI-CODE&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>Sat, 10 Sep 2022 15:13:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/keep-only-highest-value-text-in-selected-text/m-p/11413140#M41158</guid>
      <dc:creator>_Tharwat</dc:creator>
      <dc:date>2022-09-10T15:13:17Z</dc:date>
    </item>
  </channel>
</rss>

