Jump to content

Recommended Posts

Posted

hello all:

There are dimensions I need to do this to.

image.thumb.png.572731c5645aad88071b9907f6d0803c.png

I have a routine to do this

image.png.25a3cb26372ec4e0c063a7b8e59bf50f.png

It would be possible to do everything in a single selection

I mean select the dimension and place the break and the line over the text

I await comments and here I put the code, thank you

; Original by RonJonP, edited by P. Kenewell
(defun c:ltx (/ o s)
  (setvar "cmdecho" 0)
  (command "._undo" "_be")
  (if (setq s (ssget ":L" '((0 . "*TEXT,DIMENSION"))))
    (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
      (setq o (vlax-ename->vla-object e))
      (cond
         ((= "TEXT" (cdr (assoc 0 (entget e))))
            (vla-put-textstring o
               (strcat "%%O"
                  (vl-string-subst "" ""
                     (vl-string-subst "" "%%O" (vla-get-textstring o))
                  )
               )
            )
         )
         ((= "MTEXT" (cdr (assoc 0 (entget e))))
            (vla-put-textstring o
               (strcat "\\O"
                  (vl-string-subst "" "" 
                     (vl-string-subst "" "\\O" (vla-get-textstring o))
                  )
               )
            )
         )
         ((= "DIMENSION" (cdr (assoc 0 (entget e))))
            (if (= (vla-get-textoverride o) "")
               (vla-put-textoverride o "\\O<>")
               (vla-put-textoverride o
                  (strcat "\\O"
                     (vl-string-subst "" "" 
                        (vl-string-subst "" "\\O" (vla-get-textoverride o))
                     )
                  )
               )
            )
         )
      )
    )
  )
  (command "._undo" "_end")
  (setvar "cmdecho" 1)
  (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...