- 积分
- 275
- 明经币
- 个
- 注册时间
- 2011-10-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
private void button2_Click(object sender, EventArgs e)
{
Microsoft.VisualBasic.Interaction.AppActivate(AcadApp.Caption);
AcadSelectionSet mySelectionSet;
string myset = "NewSelectionSet1";
mySelectionSet = AcadDoc.SelectionSets.Add(myset);
Int16[] FilterType = new Int16[1];
object[] FilterData = new object[1];
FilterType[0] = 62;
FilterData[0] = "256";
double[] p1 = new double[3] { 0, 0, 0 };
double[] p2 = new double[3] { 86000, 60600, 0 };
mySelectionSet.Select(AcSelect.acSelectionSetAll, p1, p2, FilterType, FilterData);
int t = mySelectionSet.Count;
object[] obj = new object[mySelectionSet.Count];
label1.Text = t.ToString();
for (int i = 0; i <= t - 1; i++)
{
T1.Text += mySelectionSet.Item(i).Document.ToString() + "\t" + "\n";
T1.Text += mySelectionSet.Item(i).ObjectName.ToString() + "\n";
label2.Text = mySelectionSet.Item(i).OwnerID.ToString();
mySelectionSet.Highlight(true);
…………………………//实现改选择集中对象的所在图层
}
AcadDoc.SelectionSets.Item(myset).Delete();
}
该贴已经同步到 思行合一的微博 |
|