public ObjectId make(string str, Point3d pt,string layer,Color color,double hei,double factor,
TextHorizontalMode horMode = TextHorizontalMode.TextLeft, TextVerticalMode verMode = TextVerticalMode.TextBottom)
{
var res = ObjectId.Null;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
BlockTable bt = tr.GetObject(db.BlockTableId,OpenMode.ForRead) as BlockTable;
BlockTableRecord mSpace = tr.GetObject(bt[BlockTableRecord.ModelSpace],OpenMode.ForWrite) as BlockTableRecord;
DBText dbText = new DBText();
dbText.SetDatabaseDefaults(db);
dbText.Position = pt;// Point3d.Origin;
dbText.Height = hei;// 5.0;
dbText.TextString = str;// "Autodesk";
dbText.HorizontalMode = horMode;// TextHorizontalMode.TextCenter;
dbText.VerticalMode = verMode;// TextVer
cad net 添加文字 DBText
最新推荐文章于 2024-09-29 11:39:33 发布

最低0.47元/天 解锁文章
2083

被折叠的 条评论
为什么被折叠?



