请问各位老师,如何explode炸开Mtext实体?
请问各位老师,如何explode炸开Mtext实体?在AcadMText中,没有发现explode的方法AcadSelectionSet MTextSelectset;
MTextSelectset = AcadDocpart.SelectionSets.Add("MTextSelection");
Int16[] MTextFilterType = new Int16;
object[] MTextFilterData = new object;
MTextFilterType = 0;
MTextFilterData = "MTEXT";
double[] MTextpoint01 = new double;
double[] MTextpoint02 = new double;
MTextpoint01 = 0; MTextpoint01 = 0; MTextpoint01 = 0;
MTextpoint02 = 1000; MTextpoint02 = 1000; MTextpoint02 = 0;
MTextSelectset.Select(AcSelect.acSelectionSetAll, MTextpoint01, MTextpoint02, MTextFilterType, MTextFilterData);
AcadMText[] T = new AcadMText;
AcadDocpart.SendCommand("explode" + Convert.ToChar(Keys.Enter).ToString() + Convert.ToChar(Keys.Enter).ToString());
if (MTextSelectset.Count > 0)
{
textBox1.Text += DwgPaths + "存在多行文字,程序处理炸开为单行文字";
for (int i = 0; i < MTextSelectset.Count; i++)
{
T = (AcadMText)MTextSelectset.Item(i);
//如何炸开?
}
}
AcadDocpart.SelectionSets.Item("MTextSelection").Delete();
Explode 是 Entity 的 Method
Entity.Explode Method http://bbs.mjtd.com/thread-20768-1-1.html 雪山飞狐_lzh 发表于 2015-4-7 10:31 static/image/common/back.gif
http://bbs.mjtd.com/thread-20768-1-1.html
AcadDocpart.SendCommand("explode" + Convert.ToChar(Keys.Enter).ToString()
+ "(Handent" + "\"" + MTEXTtemp.Handle.ToString() + "\"" + ")" + Convert.ToChar(Keys.Enter).ToString() + Convert.ToChar(Keys.Enter).ToString());
找到一不错的方法。唉,C# APP com 操纵CAD的资料好少
页:
[1]