<?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 select multileader by style in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265794#M172607</link>
    <description>&lt;P&gt;I am trying to write a routine that will select all the multileaders in a drawing by a stylename and move them to a new layer.&lt;/P&gt;&lt;P&gt;I am having problems getting the program to select a multileader by a specific style. It reports that there are no multileader in the drawing with the style name of "AEC_KN_Keynotes".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a screen shoot of the multileader:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaulGrafPZAZ7_0-1789413677664.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1661195iADFA548CECF51E07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaulGrafPZAZ7_0-1789413677664.png" alt="PaulGrafPZAZ7_0-1789413677664.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:sml ( / styleEnt ss )&lt;BR /&gt;(setq styleEnt (tblobjname "mleaderstyle" "AEC_AC_Keynotes"))&lt;BR /&gt;(if styleEnt&lt;BR /&gt;(progn&lt;BR /&gt;(setq ss (ssget "X" (list '(0 . "MULTILEADER") (cons 340 styleEnt) '(67 . 1))))&lt;BR /&gt;(if ss&lt;BR /&gt;(progn&lt;BR /&gt;(sssetfirst nil ss)&lt;BR /&gt;(princ (strcat "\nSuccess: Selected " (itoa (sslength ss)) " Multileaders."))&lt;BR /&gt;)&lt;BR /&gt;(princ "\nNotice: No Multileaders found with style 'AEC_AC_Keynotes' in Paper Space.")&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ "\nError: The MLeader style 'AEC_AC_Keynotes' does not exist in this drawing.")&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is my drawing &amp;amp; lisp file. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2026 19:30:21 GMT</pubDate>
    <dc:creator>Paul.GrafPZAZ7</dc:creator>
    <dc:date>2026-09-14T19:30:21Z</dc:date>
    <item>
      <title>select multileader by style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265794#M172607</link>
      <description>&lt;P&gt;I am trying to write a routine that will select all the multileaders in a drawing by a stylename and move them to a new layer.&lt;/P&gt;&lt;P&gt;I am having problems getting the program to select a multileader by a specific style. It reports that there are no multileader in the drawing with the style name of "AEC_KN_Keynotes".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a screen shoot of the multileader:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaulGrafPZAZ7_0-1789413677664.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1661195iADFA548CECF51E07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaulGrafPZAZ7_0-1789413677664.png" alt="PaulGrafPZAZ7_0-1789413677664.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:sml ( / styleEnt ss )&lt;BR /&gt;(setq styleEnt (tblobjname "mleaderstyle" "AEC_AC_Keynotes"))&lt;BR /&gt;(if styleEnt&lt;BR /&gt;(progn&lt;BR /&gt;(setq ss (ssget "X" (list '(0 . "MULTILEADER") (cons 340 styleEnt) '(67 . 1))))&lt;BR /&gt;(if ss&lt;BR /&gt;(progn&lt;BR /&gt;(sssetfirst nil ss)&lt;BR /&gt;(princ (strcat "\nSuccess: Selected " (itoa (sslength ss)) " Multileaders."))&lt;BR /&gt;)&lt;BR /&gt;(princ "\nNotice: No Multileaders found with style 'AEC_AC_Keynotes' in Paper Space.")&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ "\nError: The MLeader style 'AEC_AC_Keynotes' does not exist in this drawing.")&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is my drawing &amp;amp; lisp file. Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2026 19:30:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265794#M172607</guid>
      <dc:creator>Paul.GrafPZAZ7</dc:creator>
      <dc:date>2026-09-14T19:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: select multileader by style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265853#M172609</link>
      <description>&lt;P&gt;&lt;SPAN&gt;try to ssget all mleaders first, then filter out those that don't use the requested style.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2026 20:30:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265853#M172609</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2026-09-14T20:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: select multileader by style</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265858#M172610</link>
      <description>&lt;P&gt;I just got this to work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:sml2 ( / ss i ent obj styleName selectList )&lt;BR /&gt;(vl-load-com)&lt;BR /&gt;;; 1. Select all Multileaders strictly in Paper Space (Layouts)&lt;BR /&gt;(setq ss (ssget "X" '((0 . "MULTILEADER") (67 . 1))))&lt;BR /&gt;&lt;BR /&gt;(if ss&lt;BR /&gt;(progn&lt;BR /&gt;;; Create an empty selection set to hold matches&lt;BR /&gt;(setq selectList (ssadd))&lt;BR /&gt;(setq i 0)&lt;BR /&gt;&lt;BR /&gt;;; 2. Loop through each MLeader and check its Style Name property&lt;BR /&gt;(repeat (sslength ss)&lt;BR /&gt;(setq ent (ssname ss i))&lt;BR /&gt;(setq obj (vlax-ename-&amp;gt;vla-object ent))&lt;BR /&gt;(setq styleName (vlax-get-property obj 'StyleName))&lt;BR /&gt;&lt;BR /&gt;;; If it matches our target style, add it to the final selection list&lt;BR /&gt;(if (= (strcase styleName) (strcase "AEC_AC_Keynotes"))&lt;BR /&gt;(ssadd ent selectList)&lt;BR /&gt;)&lt;BR /&gt;(setq i (1+ i))&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;;; 3. Highlight and grip the matched MLeaders if any were found&lt;BR /&gt;(if (&amp;gt; (sslength selectList) 0)&lt;BR /&gt;(progn&lt;BR /&gt;(sssetfirst nil selectList)&lt;BR /&gt;(princ (strcat "\nSuccess: Selected " (itoa (sslength selectList)) " Multileaders using style 'AEC_AC_Keynotes'."))&lt;BR /&gt;)&lt;BR /&gt;(princ "\nNotice: Multileaders found in Paper Space, but none match style 'AEC_AC_Keynotes'.")&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;(princ "\nNotice: Absolutely no Multileaders exist in Paper Space.")&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;(command "-layer" "make" "C-ANNO-KEY" "color" "2" "" "")&lt;BR /&gt;(command "_.CHPROP" selectList "" "_LA" "C-ANNO-KEY" "")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2026 20:33:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/select-multileader-by-style/m-p/14265858#M172610</guid>
      <dc:creator>Paul.GrafPZAZ7</dc:creator>
      <dc:date>2026-09-14T20:33:15Z</dc:date>
    </item>
  </channel>
</rss>

