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

How to get the AlignmentPoint according the ObjectID of DBtext?

2 REPLIES 2
Reply
Message 1 of 3
liqing9902
236 Views, 2 Replies

How to get the AlignmentPoint according the ObjectID of DBtext?

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!
2 REPLIES 2
Message 2 of 3
liqing9902
in reply to: liqing9902

I sovle it
use "position" property
thank zmkm1234!
Message 3 of 3
ahmed.felix
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.

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