Jump to content

extract text height from a picked single line text


Recommended Posts

Posted

any idea how to get text height when i picked single line text

Posted

Hi.

 

Try this .

(if (setq s (ssget "_+.:S" '((0 . "TEXT,MTEXT"))))
 (setq hgt (cdr (assoc 40 (entget (ssname s 0)))))
 )

Posted

hello tharwat thanks for reply

can we extract text height from this selection method

(setq 1pt(entget (car (entsel "\nSelect text: "))))

Posted

can we extract text height from this selection method

(setq 1pt(entget (car (entsel "\nSelect text: "))))

 

Sure , but you have to be sure that the user selected a text and not any other object ;)

 

Anyway here it goes .

(setq hgt (cdr (assoc 40 1pt)))

Posted
thank you tharwat for your kindness

 

You are welcome anytime :) .

 

Have a read of THIS which consist of all related DXF codes for the single line text

Posted (edited)

VL example same thing no test for if text

 

(setq obj (vlax-ename->vla-object(car (entsel "\nSelect text: "))))
(vla-get-textstring obj) ; text entered
(vla-get-height obj) ; height of text
(vla-get-rotation obj) ; text angle
; to mention a few if you want more download Dumpit.lsp this will produce list
; or
(entget (car (entsel))) ; this will show dxf code numbers like 40 above

Edited by BIGAL

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