.NET

Reply
Distinguished Contributor
367 Posts
0 Kudos
Registered: ‎12-05-2003
Post 1 of 3

Bounding box of Text

232 Views, 2 Replies
03-09-2006 05:39 AM
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
Vault Pro 2014, Windows 7 64 bit, AutoCAD (ACA, Map) 2014

Re: Bounding box of Text

03-09-2006 11:04 AM 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
*Tony Tanzillo
Post 3 of 3

Re: Bounding box of Text

03-09-2006 02:13 PM 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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post