本文介绍了C#代码从autocad绘图中选择文本&在消息框中显示它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从autocad绘图中选择一个文本&我想在消息框上显示文本值
我尝试过:
I want to select a text from autocad drawing & i want to show that text value on message box
What I have tried:
SelectionFilter sf = new SelectionFilter(new TypedValue[] { new TypedValue(0, "TEXT") });
PromptSelectionOptions pso = new PromptSelectionOptions();
pso.MessageForAdding = "\nSelect the text";
pso.SingleOnly = true;
PromptSelectionResult psr1 = ed.GetSelection(pso, sf);
if (psr1.Status != PromptStatus.OK) return;
SelectionSet ss = psr1.Value;
ObjectId[] id = ss.GetObjectIds();
MessageBox.Show(id.ToString());
推荐答案
这篇关于C#代码从autocad绘图中选择文本&在消息框中显示它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!