.NET

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

Bounding box of Text

200 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 (200 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 (200 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community