- 积分
- 275
- 明经币
- 个
- 注册时间
- 2011-10-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2011-10-11 21:28:45
|
显示全部楼层
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);
mySelectionSet.Erase();//这句就是删除选择集中的对像,
AcadDoc.SelectionSets.Item(myset).Delete();
把上面的代码加在一个命令按钮中就行了 |
|