示例为修改多行文字的高宽比

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();
            }
        }

 

相关文章:

  • 2021-11-03
  • 2021-12-09
  • 2021-12-08
  • 2022-01-22
  • 2022-12-23
  • 2021-12-19
  • 2022-01-09
猜你喜欢
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案