Greg McLandsborough
Usenet Archive
- Joined
- Sep 11, 2003
- Messages
- 46
- Reaction score
- 0
This code is driving me silly..
(defun mm-put-entity-att-value
(Block-Ent TagString Textstring / Block-Set Block-Entity Block-Next cnt) (setq Block-Next Block-Ent) (while (setq Block-Next (entnext Block-Next)) (if (= (dxf 0 (setq Block-Entity (entget Block-Next))) "ATTRIB") (if (= (dxf 2 Block-Entity) TagString) (progn (entmod (subst (cons 1 Textstring) (assoc 1 Block-Entity) Block-Entity)) (entupd Block-Ent) ) ) ) )
)
I use it to select a single block, ie my material list, which is the same block inserted many times. I change on Block-Ent which is pass a ename, but several of the blocks are updated, sometimes all, but not always. Does anyone know what I doing wrong ??
(defun mm-put-entity-att-value
(Block-Ent TagString Textstring / Block-Set Block-Entity Block-Next cnt) (setq Block-Next Block-Ent) (while (setq Block-Next (entnext Block-Next)) (if (= (dxf 0 (setq Block-Entity (entget Block-Next))) "ATTRIB") (if (= (dxf 2 Block-Entity) TagString) (progn (entmod (subst (cons 1 Textstring) (assoc 1 Block-Entity) Block-Entity)) (entupd Block-Ent) ) ) ) )
)
I use it to select a single block, ie my material list, which is the same block inserted many times. I change on Block-Ent which is pass a ename, but several of the blocks are updated, sometimes all, but not always. Does anyone know what I doing wrong ??