Author Topic: Attribute Text Width  (Read 157 times)

0 Members and 1 Guest are viewing this topic.

MeasureUp

  • Bull Frog
  • Posts: 462
Attribute Text Width
« on: March 29, 2024, 02:02:31 AM »
There is a given attribute named as ATT-01 in a given block BLK-01.
How to change the attribute text width to 0.75?

I did a search here but don't find what I am exactly after.

Thanks in advance.

Lastknownuser

  • Newt
  • Posts: 26
Re: Attribute Text Width
« Reply #1 on: March 29, 2024, 07:03:56 AM »
Try this it should work
Code: [Select]
(defun c:test ( / int sel ent get)
(setq int -1)
(setq sel (ssget '((0 . "INSERT") (2 . "BLK-01"))));BLK-01
(while (setq int (1+ int)
     ent (ssname sel int)
     );setq
  (while (/= (cdr (assoc 0 (setq get (entget (setq ent (entnext ent)))))) "SEQEND")
    (if (= (cdr (assoc 2 get)) "ATT-01");ATT-01
      (entupd (cdr (assoc -1 (entmod (subst (cons 41 0.75) (assoc 41 get) get)))));0.75
      );if
    );while
  );while
);defun

edit: localised all variables
« Last Edit: March 29, 2024, 07:08:46 AM by Lastknownuser »