Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/22/2019 in all areas

  1. It's not a problem, it's publically posted code. Thanks to @Tharwat for an easier solution. Try the attached. cta.lsp
    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
  3. @dlanorh Just replace the vla-get-effectivename function with vla-get-name.
    1 point
×
×
  • Create New...