.NET

Reply
New Member
liqing9902
Posts: 2
Registered: ‎12-04-2006
Message 1 of 3 (98 Views)

How to get the AlignmentPoint according the ObjectID of DBtext?

98 Views, 2 Replies
12-04-2006 12:50 AM
Help me! Friends:
I have got the ObjectID of a Entity of DBtext,and I want to get the AlignmentPoint of the DBText.

The Codes below :
----------------------
Dim ent As Entity = tm.GetObject(id, OpenMode.ForWrite, False)
Dim dbtxt As DBText= CType(ent, DBText)
.....

the value of "dbtxt.textString" is correct
but the value of "dbtxt.AlignmentPoint.Y" is 0 !!!
I don't know Why I can't get the X,Y,Z of the AlignmentPoint
Maybe the issue is "Dim dbtxt As DBText= CType(ent, DBText)",but I don't know how to solve the problem.
please Help me!
Regards!
New Member
liqing9902
Posts: 2
Registered: ‎12-04-2006
Message 2 of 3 (98 Views)

Re: How to get the AlignmentPoint according the ObjectID of DBtext?

12-04-2006 01:09 AM in reply to: liqing9902
I sovle it
use "position" property
thank zmkm1234!
Active Contributor
ahmed.felix
Posts: 38
Registered: ‎08-31-2006
Message 3 of 3 (98 Views)

Re: How to get the AlignmentPoint according the ObjectID of DBtext?

12-12-2006 03:57 PM in reply to: liqing9902
Just notice that Position and AlignmentPoint are two different properties. Normally they display the same thing, but if you for example center a text, AlignmentPoint and Position are different. Check the AlignmentPoint of your text in the Properties panel in Autocad to see if it has a Y value different than 0.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.