.NET

Reply
Distinguished Contributor
wesbird
Posts: 352
Registered: ‎12-05-2003
Message 1 of 3 (226 Views)

Bounding box of Text

226 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
*tp
Message 2 of 3 (226 Views)

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
Message 3 of 3 (226 Views)

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
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!