.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bounding box of Text

2 REPLIES 2
Reply
Message 1 of 3
wesbird
593 Views, 2 Replies

Bounding box of Text

Hi,
in my post below:
http://discussion.autodesk.com/thread.jspa?threadID=458585
I ask the bounding box of TEXT and MTEXT. I already get MTEXT figure out. Now I still have problem to get the bounding box of TEXT (DBTEXT).
did anyone know the solution? I appreaciate your help.



Thank you
Wes
Windows 10 64 bit, AutoCAD (ACA, Map) 2023
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: wesbird

Hi,
See atached file.
I'm working about it yet.
tp


escreveu na mensagem news:5106021@discussion.autodesk.com...
Hi,
in my post below:
http://discussion.autodesk.com/thread.jspa?threadID=458585
I ask the bounding box of TEXT and MTEXT. I already get MTEXT figure out.
Now I still have problem to get the bounding box of TEXT (DBTEXT).
did anyone know the solution? I appreaciate your help.



Thank you
Wes
Message 3 of 3
Anonymous
in reply to: wesbird

Reference AcMgdInternal.dll (where Acad.exe is),
then use this:

using Autodesk.AutoCAD.Internal;

Point2d Utils.GetTextExtents(ObjectId styleId,
string TextToMeasure, double Height);

styleId is the ObjectId if the text style,
TextToMeasure is the contents of the text,
and Height is the height of the text.

If the text has a width factor <> 1.0 then
you need to scale the Y ordinate of the
resulting Point2d by that factor.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

wrote in message news:5106021@discussion.autodesk.com...
Hi,
in my post below:
http://discussion.autodesk.com/thread.jspa?threadID=458585
I ask the bounding box of TEXT and MTEXT. I already get MTEXT figure out. Now I still have problem to get the bounding box of TEXT (DBTEXT).
did anyone know the solution? I appreaciate your help.



Thank you
Wes

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost