Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/27/2021 in all areas

  1. SEE (defun c:QQQnewleader ( / C EXYZ NEWLEADER PTEN PTS_SS SS_LEN ) (setq pts_ss (ssget (list (cons 0 "*TEXT")))) (setq ss_len (sslength pts_ss)) (setq c 0) (while (< c ss_len) (progn (setq pten (ssname pts_ss c)) (setq exyz (cdr (ASSOC 10 (ENTGET pten)))) (command "._MLEADER" exyz (list (+ 0.5 (car exyz)) (+ 0.2 (cadr exyz)) (caddr exyz)) "") (setq newleader (vlax-ename->vla-object (entlast))) (vla-put-textstring newleader (cdr (ASSOC 1 (ENTGET pten)))) (setq c (+ c 1)) ) ) (princ) )
    1 point
  2. I would suggest the following: (defun c:blockprops ( / blk def ent enx idx lst sel ) (if (setq sel (ssget '((0 . "INSERT")))) (progn (repeat (setq idx (sslength sel)) (setq idx (1- idx) blk (LM:name->effectivename (cdr (assoc 2 (entget (ssname sel idx))))) ) (or (member blk lst) (setq lst (cons blk lst))) ) (while (setq def (tblnext "block" (not def))) (if (member (LM:name->effectivename (setq blk (cdr (assoc 2 def)))) lst) (progn (setq ent (tblobjname "block" blk)) (while (setq ent (entnext ent)) (entmod (append (entget ent) (if (= "HATCH" (cdr (assoc 0 enx))) '((8 . "0") (62 . 000)) '((8 . "0") (62 . 256)) ) ) ) ) ) ) ) (command "_.regen") ) ) (princ) ) ;; Block Name -> Effective Block Name - Lee Mac ;; blk - [str] Block name (defun LM:name->effectivename ( blk / rep ) (if (and (wcmatch blk "`**") (setq rep (cdadr (assoc -3 (entget (cdr (assoc 330 (entget (tblobjname "block" blk)))) '("AcDbBlockRepBTag") ) ) ) ) (setq rep (handent (cdr (assoc 1005 rep)))) ) (cdr (assoc 2 (entget rep))) blk ) ) (princ)
    1 point
×
×
  • Create New...