- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i run this code to modify my dim text
(defun c:bc ()
(setq dim (car (entsel "\nSelect dimension object: ")))
(setq b (getreal "\nEnter new value for b: "))
(setq a (cdr (assoc 42 (entget dim))))
(setq c (/ a b))
(setq text (strcat "c@b=" (rtos c) " "))
(setq ent (entnext dim))
(while (/= (type ent) 'ENDBLK)
(setq entData (entget ent))
(if (and (eq (cdr (assoc 0 entData)) "TEXT") (equal (cdr (assoc 1 entData)) text))
(setq textEntData entData)
)
(setq ent (entnext ent))
)
(if (not (boundp 'textEntData))
(progn
(princ "\nCould not find associated text entity.")
(exit)
)
(entmod (subst (cons 1 text) (assoc 1 textEntData) textEntData))
)
(princ)
)
i have chose a rotated dimmension and other kind of dim but it keep result
; error: bad argument type: lentityp nil
Pls help me with this error.
Solved! Go to Solution.