Jump to content

Recommended Posts

Posted

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.

Posted

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)
 )

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...