Multiple Mleader to Make separate Bloks

Multiple Mleader to Make separate Bloks

bit_Cad2018
Advocate Advocate
707 Views
5 Replies
Message 1 of 6

Multiple Mleader to Make separate Bloks

bit_Cad2018
Advocate
Advocate

Hi Users

                 I have lots of Mleder CS Number wise I am trying to make a block CS Number wise If you have any suggestion please tell me 

 

Please see attached DWG file for your reference

0 Likes
Accepted solutions (1)
708 Views
5 Replies
Replies (5)
Message 2 of 6

bit_Cad2018
Advocate
Advocate

I don't have received confirmation about the request posted, hence Three-time the same post posted.

 

sorry for that

0 Likes
Message 3 of 6

ВeekeeCZ
Consultant
Consultant

Don't worry, the site is screwed. Again.

If that happen hit the Report button and ask for the removal.

0 Likes
Message 4 of 6

ВeekeeCZ
Consultant
Consultant
Accepted solution

This should make it happen.

 

(vl-load-com)

(defun c:MleaderBlockify (/ s i e p r n x m)

  (if (setq s (ssget "_:L" '((0 . "MULTILEADER"))))
    (repeat (setq i (sslength s))
      (setq e (ssname s (setq i (1- i)))
	    p (cdadr (member '(304 . "LEADER_LINE{") (entget e)))
	    r (getpropertyvalue e "MText/Rotation")
	    n (getpropertyvalue e "MText/Contents"))
      (if (vl-string-position (ascii ";") n nil T)
	(setq n (vl-string-right-trim "}" (substr n (+ 2 (vl-string-position (ascii ";") n nil T))))))
      (setq x -1)
      (if (tblsearch "block" n)
	(while (tblsearch "block" (setq m (strcat n "-" (itoa (setq x (1+ x))))))))
      (setq n (cond (m) (n)))
      (command "_.rotate" e "" "_non" p "_r" (angtos r (getvar 'aunits) 8) 0
	       "_.block" n "_non" p e ""
	       "_.insert" n "_s" 1 "_r" 0 "_non" p)))
  (princ)
  )
0 Likes
Message 5 of 6

bit_Cad2018
Advocate
Advocate

Dear @ВeekeeCZ thank you very much. I am grateful to you.

0 Likes
Message 6 of 6

bit_Cad2018
Advocate
Advocate

okay, I will try