查看单个帖子
旧 2009-04-20, 04:09 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】[求助]在c#中,已知图块名称,如何快速找到指定图块?

[求助]在c#中,已知图块名称,如何快速找到指定图块?
www.dimcax.com
[求助]在c#中,已知图块名称,如何快速找到指定图块?如题,我想找到指定的图块,图块名我已经知道了,关键是如果快速找到它。我试过用selectionset,但在运行中出现错误。哪位达人指点一下:
//最后一关:如何快速找到指定图块?
acadselectionset acadselset = doc.selectionsets.add("findborder");
int[] filtertype = new int[] { 0, 2 };
object [] filterdata = new object [] { "intsert", "border" };
acadselset.select(acselect.acselectionsetall, new double [] {0,0} , new double [] {0,0}, filtertype, filterdata); //在这儿出错
能不能帮忙看一下,多谢
acadselset.select(acselect.acselectionsetall, new double [] {0,0} , new double [] {0,0}, filtertype, filterdata);
你试着将上句中的两处new double [] {0,0} 改为 new point2d(0,0)试试
int[] filtertype = new int[] { 0, 2 };错
改为:
short[] filtertype = new short[] { 0, 2 };

点应该是:
new double [] {0,0,0}
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)