Message 1 of 3
C#)DBText alignment error when openning ReadDwgFile Method have modified DBText

Not applicable
09-06-2016
09:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
Please attachment video.
DBtext alignment is not right when DBText update by ReadDwgFile Method.
Open the drawing can be seen that the change position when DBText TextEdit mode.
ex) DBText Change Method
public void ChangeDBTExt { Database acCurDB = new Database(false, false); acCurDB.ReadDwgFile(filePath, FileOpenMode.OpenForReadAndAllShare, false, ""); acCurDB.CloseInput(true); using (Transaction acTrans = acdoc.TransactionManager.StartTransaction()) { DBText dbtext = acTrans.GetObject(MyFocusedHandle, OpenMode.ForRead) as DBText; dbText.UpgradeOpen(); dbText.TextString = MyString; //dbText.AdjustAlignment(acCurDB); acTrans.Commit(); } }
So I searched a site to calculate mid alignment (http://www.acadnetwork.com/index.php?topic=311.0)
but this method also fails.
Will you have any way to solve this problem?
Thanks.