//获取字体样式
ObjectId getTextStyle(Database pDb, string styleName)
{
ObjectId return_styleId = ObjectId.Null;
using (TextStyleTable pStyles = (TextStyleTable)pDb.TextStyleTableId.GetObject(OpenMode.ForRead))
{
foreach (ObjectId item in pStyles)
{
using (TextStyleTableRecord texRec = (TextStyleTableRecord)item.GetObject(OpenMode.ForRead))
{
if (texRec.Name == styleName)
{
return_styleId = texRec.ObjectId;
break;
}
}
}
}
return return_styleId;
}
Teigha获取字体样式
最新推荐文章于 2022-10-18 12:50:02 发布