liuyang4740 发表于 2007-10-25 16:22:00

求助:向选择集添加元素问题

本帖最后由 作者 于 2007-10-26 14:49:45 编辑 <br /><br /> <p>我用一下方法建立了一个选择集,但是,怎样将符合条件的文本添加到选择集中呢?(比如要将“第*”添加到选择集)</p><p>&nbsp;&nbsp;&nbsp; Dim SsetObj As AcadSelectionSet<br/>&nbsp;&nbsp;&nbsp; For i = 0 To ThisDrawing.SelectionSets.Count - 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set SsetObj = ThisDrawing.SelectionSets.Item(i)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If SsetObj.Name = "au100" Then SsetObj.Delete<br/>&nbsp;&nbsp;&nbsp; Next i<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set SsetObj = ThisDrawing.SelectionSets.Add(SsetName)</p><p>&nbsp;&nbsp;&nbsp; For Each objSel In ThisDrawing.ModelSpace<br/>&nbsp;&nbsp;&nbsp; If objSel.ObjectName = "AcDbText" Then<br/>&nbsp;&nbsp;&nbsp; If objSel.TextString Like "第*" Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sset.add.objSel<br/>但是选择集却是空集,请教高手!<br/> </p>

liuyang4740 发表于 2007-10-31 20:09:00

这个问题困惑我好久了,大家帮忙解决一下了,多谢了!
页: [1]
查看完整版本: 求助:向选择集添加元素问题