Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
When the current text style represents a text object is added to the DWG database, the default text style used by the operating system variable TEXTSTYLE, system variable reference:
http://www.mxdraw.com/help_2_48.html
Sets the current text style C #
// 添加文字样式
axMxDrawX1.AddTextStyle1("MyTextStyle", "txt.shx", "hztxt.shx", 1);
// 得到当前数据库
MxDrawDatabase database = (MxDrawDatabase)axMxDrawX1.GetDatabase();
// 设置当前文字样式
database.CurrentlyTextStyle = "MyTextStyle";
Take the current text style code:
String sCurrentTextStyle = database.CurrentlyTextStyle;