调用文字在位编辑器
示例为修改多行文字的高宽比
public static void ChangeMtextWidthFactor(ObjectId mtextId,double widthFactor) { if(mtextId==null ||mtextId==ObjectId.Null) return ; using (Transaction trx = ZMQCad.ApplicationServicesEx.Var.ActiveDatabase.TransactionManager.StartTransaction()) { MText mt = trx.GetObject(mtextId, OpenMode.ForWrite) as MText; using (TextEditor te = InplaceTextEditor.CreateTextEditor(mt)) { te.SelectAll(); te.Selection.WidthScale = widthFactor; te.Close(TextEditor.ExitStatus.ExitSave); } trx.Commit(); } }