Jump to content

text to point height


Lippens Infra

Recommended Posts

hello,

 

I have a file where there are a lot of points measured in height. The height is displayed as text. Is it possible to generate a point on the insertion point of the text (x and y) and the Z value is the value of the text?

 

Thanks

Landmetersplan.dxf

Link to comment
Share on other sites

Hi,

Something like this?

(defun c:Test (/ int sel ent get ins)
  ;; Tharwat - 18.Nov.2020	;;
  (and (princ "\nSelect Texts : ")
       (setq int -1
             sel (ssget "_:L" '((0 . "TEXT")))
       )
       (while (setq int (1+ int)
                    ent (ssname sel int)
              )
         (and (setq get (entget ent)
                    ins (cdr (assoc (if (and (zerop (cdr (assoc 72 get)))
                                             (zerop (cdr (assoc 73 get)))
                                        )
                                      10
                                      11
                                    )
                                    get
                             )
                        )
              )
              (entmake (list '(0 . "POINT")
                             (cons 10 (mapcar '+ '(0. 0.) ins))
                             (assoc 8 get)
                       )
              )
              (entmod
                (subst (cons 1 (rtos (caddr ins) 2 4)) (assoc 1 get) get)
              )
         )
       )
  )
  (princ)
)

 

Link to comment
Share on other sites

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