nxy_918 发表于 2004-4-6 21:20:00

选择集的怪问题?

本帖最后由 作者 于 2004-4-7 9:15:26 编辑

小弟我再做一个删除重复线的程序,运行时,其选择集有时候会出现,有时候又正常,不知道其他网友碰到过没有



        是不是内存的问题??/,还望指点





程序与调试图:


mccad 发表于 2004-4-7 21:38:00

关键是删除顺序造成选择集中的对象变化。


你可以把不需要删除的对象Remove出选择集,最后直接到选择集Erease就可以了。

luckyang 发表于 2004-5-3 14:40:00

我也经常碰到IAcadselectionset的问题,帮助文件里也没有,下问说可以有128个selection sets,但是程序中好象只允许一个存在。我每次都只能采用以下方式进行,否则就会出错,请各位发表看法。


Set Sset = ThisDrawing.SelectionSets.Add("Temp")<BR>Sset.Clear


<BR>Sset.AddItems Entitys<BR>ThisDrawing.SelectionSets("Temp").Delete<BR>


To add a new member to the collection, use the Add method. To select a specific selection set, use the Item method. To delete a specific selection set, use the Delete method found in the SelectionSet object. You can create up to 128 selection sets in your drawing.


There can be only one instance of the SelectionSets Collection. The SelectionSets Collection is predefined for each drawing. You can make multiple references to it by using the SelectionSets property. Once done with an object, the reference is automatically released.

mccad 发表于 2004-5-3 18:49:00

选择集可以是多个,但一个名称的选择集中允许一个存在,不允许重名。
页: [1]
查看完整版本: 选择集的怪问题?