改变选择集对象的图层属性
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;
object[] FilterData = new object;
FilterType = 62;
FilterData = "256";
double[] p1 = new double { 0, 0, 0 };
double[] p2 = new double { 86000, 60600, 0 };
mySelectionSet.Select(AcSelect.acSelectionSetAll, p1, p2, FilterType, FilterData);
int t = mySelectionSet.Count;
object[] obj = new object;
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();
}
http://bbs.mjtd.com/xwb/images/bgimg/icon_logo.png 该贴已经同步到 思行合一的微博 VBA/VB/ActiveX/API 编程技术 这个版块或许更适合你 为什么?朋友
页:
[1]