Author Topic: Multi-leaders without leaders..  (Read 902 times)

0 Members and 1 Guest are viewing this topic.

cyclops

  • Newt
  • Posts: 21
Multi-leaders without leaders..
« on: April 09, 2021, 10:18:54 AM »
Help,
Is there lisp that can find Multi-leaders without leaders, then explode them?
Thank
Cy :tickedoff:
It's 'O'Neill', with three L's!!!! (Jack O'Neill)

ronjonp

  • Needs a day job
  • Posts: 7526
Re: Multi-leaders without leaders..
« Reply #1 on: April 09, 2021, 11:52:06 AM »
Maybe this to get the selection:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:foo (/ s)
  2.   (if (setq s (ssget "_X" '((0 . "MULTILEADER"))))
  3.     (progn (foreach e (mapcar 'cadr (ssnamex s))
  4.              (or (vl-catch-all-error-p
  5.                    (vl-catch-all-apply 'vla-getleaderindex (list (vlax-ename->vla-object e) 0))
  6.                  )
  7.                  (ssdel e s)
  8.              )
  9.            )
  10.            (sssetfirst nil s)
  11.     )
  12.   )
  13.   (princ)
  14. )

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC