sus1982 发表于 2006-1-4 15:16:00

我用Sset.SelectOnScreen给新建的选择集添加对象,可老是选不上对象,下面代码没反应

我用Sset.SelectOnScreen给新建的选择集添加对象,可老是选不上对象,下面代码没反应,请高手们帮我看看把<P>Sub addrelativityline()<BR>&nbsp;&nbsp; Dim lineSelection1 As AcadSelectionSet<BR>&nbsp;&nbsp; On Error Resume Next<BR>&nbsp;ThisDrawing.SelectionSets("SSl").Delet<BR>&nbsp;&nbsp; Set lineSelection1 = ThisDrawing.SelectionSets.Add("SSl")<BR>&nbsp;&nbsp; Sset.SelectOnScreen<BR>&nbsp;&nbsp; ThisDrawing.ModelSpace.lineSelection1.Erase<BR>End Sub</P>

storyst 发表于 2006-1-5 09:48:00

Dim sset As AcadSelectionSet<BR>&nbsp;&nbsp;&nbsp; If Not IsNull(ThisDrawing.SelectionSets.Item("newadd")) Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set sset = ThisDrawing.SelectionSets.Item("newadd")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sset.Delete<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp;&nbsp;&nbsp;&nbsp; Set sset = ThisDrawing.SelectionSets.Add("newadd")<BR>&nbsp;&nbsp;&nbsp;&nbsp; sset.SelectOnScreen
页: [1]
查看完整版本: 我用Sset.SelectOnScreen给新建的选择集添加对象,可老是选不上对象,下面代码没反应