plackowski Posted December 6, 2016 Posted December 6, 2016 Not sure if this is the right place to post this, but here goes. I've got a block that I frequently edit. One of the tags is in inches, so every time I edit the value I have to append a quotation mark " for inches. Can I append this to the tag in such a way that I don't have to change it each time? I thought about creating a second text object for the quotation mark, but the attribute needs to be centered and the value can change from 1 to 2 digits so it wouldn't always line up properly. Quote
Tharwat Posted December 6, 2016 Posted December 6, 2016 Hi, Give this a shot. (defun c:Test (/ st s e) (and (/= "" (setq st (getstring t "\nEnter text value without Inch quotes :"))) (setq s (car (nentsel "\nPick on Attribute :"))) (= (cdr (assoc 0 (setq e (entget s)))) "ATTRIB") (entmod (subst (cons 1 (strcat st "\"")) (assoc 1 e) e)) ) (princ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.