Jump to content

[Request] Lisp to replace Dim text override


Recommended Posts

Posted

Hi everyone,

 

Please help me a lisp to search and replace Dimension text override (like as Lee Mac's lisp but just run in background, not with DCL).

E.g: Replace all of dimensions text from <mesurevalue> to <> (in background)

 

Thank you so much.
HAI

Posted

If you're merely looking to remove any & all dimension text overrides, you can try the following:

(defun c:removedimtextoverride ( / i s x )
    (if (setq s (ssget "_X" '((0 . "*DIMENSION") (1 . "*?*"))))
        (repeat (setq i (sslength s))
            (setq i (1- i)
                  x (entget (ssname s i))
            )
            (entmod (subst '(1 . "") (assoc 1 x) x))
        )
        (princ "\nNo dimension measurements have been overridden.")
    )
    (princ)
)

 

  • Thanks 1
Posted

Thank @Lee Mac for your help.

 

But actually I need to search and replace just apply to Dimension element only.

Is there any method to do that?

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