Author Topic: Text lenght  (Read 3432 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Text lenght
« on: August 23, 2005, 03:40:40 PM »
what is the DXF groupCode to know the lenght of selected TEXT or MTEXT ?

I know this was the insertion point..
(setq t1 (cdr (assoc 10 text)))

so if it is bottom left...i need the bottom right end point.

I know also the justification style..

;;Justification Horizontal method
(setq t2 (cdr (assoc 72 text)))

;;Justification Vertical method
(setq t3 (cdr (assoc 73 text)))

but can find a way to detect the lenght of text.

any suggestion ?

thanks
Keep smile...

MP

  • Seagull
  • Posts: 17525
Text lenght
« Reply #1 on: August 23, 2005, 03:44:20 PM »
(textbox ...)
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Bob Wahr

  • Guest
Text lenght
« Reply #2 on: August 23, 2005, 03:47:29 PM »
I was thinking (strlen ...)  I guess it depends on what she means by length.

MP

  • Seagull
  • Posts: 17525
Text lenght
« Reply #3 on: August 23, 2005, 03:47:54 PM »
She?
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Bob Wahr

  • Guest
Text lenght
« Reply #4 on: August 23, 2005, 03:49:13 PM »
guess based on "Andrea."  Appologies if I'm wrong.

M-dub

  • Guest
Text lenght
« Reply #5 on: August 23, 2005, 03:51:21 PM »
Quote from: Bob Wahr
guess based on "Andrea."  Appologies if I'm wrong.


I've made that mistake before as well.  :oops:  I'm sure no offence is taken.  (I hope not, anyway!)

Bob Wahr

  • Guest
Text lenght
« Reply #6 on: August 23, 2005, 03:54:00 PM »
Noted and filed away for future occasions.  Sorry Andrea.

MP

  • Seagull
  • Posts: 17525
Text lenght
« Reply #7 on: August 23, 2005, 04:09:57 PM »
No foul I'm sure, I was just confused.

Anyway, see this or this for ideas.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Andrea

  • Water Moccasin
  • Posts: 2372
Text lenght
« Reply #8 on: August 23, 2005, 04:31:00 PM »
No problemo..

I'm Italian....Andrea mean Andrew... :wink:

MP...the 2 codes you give me is not working...
don't know exactly why..I don't know the textbox function..
and not very familiar with lamda to...

so....need to learn alittle more..

thanks.
Keep smile...

MP

  • Seagull
  • Posts: 17525
Text lenght
« Reply #9 on: August 23, 2005, 05:28:10 PM »
I can assure you those functions do work, but they were mentioned as ideas only; i.e. show you how the textbox and getboundingbox functions (actually getboundingbox is a subroutine) work.

If I understood your question you are looking for the length of the text (in drawing units, not string length). Either route will work (I'd suggest bounding box as it will work on a variety of objects not just text) but I digress.

Have you read the help file for either textbox or getboundingbox?
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Mark

  • Custom Title
  • Seagull
  • Posts: 28683
Text lenght
« Reply #10 on: August 23, 2005, 05:30:42 PM »
And away we go . . . . to Autolisp land.
TheSwamp.org  (serving the CAD community since 2003)

Bob Wahr

  • Guest
Text lenght
« Reply #11 on: August 23, 2005, 05:33:55 PM »
A bounding box, on rotated mtext especially, could get pretty tricky for getting the length.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10376
Text lenght
« Reply #12 on: August 23, 2005, 05:51:04 PM »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MP

  • Seagull
  • Posts: 17525
Text lenght
« Reply #13 on: August 23, 2005, 05:57:16 PM »

CAB to the rescue.
\|// Set goal. Experiment tirelessly until
|Oo| practice has become expertise.  Loop.
|- | LinkedIn | Dropbox

Andrea

  • Water Moccasin
  • Posts: 2372
Text lenght
« Reply #14 on: August 24, 2005, 11:18:43 AM »
nice....thanks.
Keep smile...