Ok, my friend.
See the code above.
I was wrote then in C#.NET.
[CommandMethod("mytext")]
public void mytext ()
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
Database db1 = HostApplicationServices.WorkingDatabase;
Transaction trans = db1.TransactionManager.StartTransaction();
BlockTable bt1 = (BlockTable)trans.GetObject(db1.BlockTableId, OpenMode.ForRead);
BlockTableRecord btr1 = (BlockTableRecord)trans.GetObject(bt1[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
DBText myTestText = new DBText();
myTestText.TextString = "Testando Alignment Text!...";
myTestText.HorizontalMode = TextHorizontalMode.TextCenter;
myTestText.VerticalMode = TextVerticalMode.TextVerticalMid;
myTestText.AlignmentPoint = new Point3d (100,100,0);
//If you use the Position Propierty now it will not work.
//(myTestText.Position = new Point3d(200, 200, 0);)
//If you want to change the position of text, you need to use Alignment Propierty
myTestText.AlignmentPoint = new Point3d(200, 200, 0);
//Then the problem is the Position Property. Understand me?
btr1.AppendEntity(myTestText);
trans.AddNewlyCreatedDBObject(myTestText,true);
trans.Commit();
trans.Dispose();
}
Then use the Alignment Property and not Position.
Cheers,
Luizoo