Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/18/2024 in all areas

  1. Basically I don't know why do you need this, but here is the code... It changes values of all attributes to match blocks names... And I doubt you're searching for this as I am guessing that you need to fill just single attribute by each block; you just didn't wrote which attribute is that - it's tag name... (defun c:blknames2attvalues ( / s i e n x ) (prompt "\nSelect blocks to fill their attributes with their block names...") (if (setq s (ssget "_:L" (list (cons 0 "INSERT") (cons 66 1)))) (repeat (setq i (sslength s)) (setq e (ssname s (setq i (1- i)))) (setq n (cdr (assoc 2 (entget e)))) (while (= (cdr (assoc 0 (setq x (entget (setq e (entnext e)))))) "ATTRIB") (entupd (cdr (assoc -1 (entmod (subst (cons 1 n) (assoc 1 x) x))))) ) ) ) (princ) )
    1 point
×
×
  • Create New...