【选择集】严重的bug!!冰天雪地裸跪求解决办法!!
很大的图纸,布局图。想删除某些固定位置的文字。图纸缩放的过小时,想用两点窗交选择某位置的文字,就会连带选择上周围的。
但是缩放到合适尺寸就不会这样。
不是捕捉和靶框的问题都关掉了。
哪位高手遇到过这种情况啊。能不能提供一个解决办法!!!
对于特殊的范围选择,比如选择点或文本,可以配合组码10
如
在minpoint和maxpoint两点范围内选择,过滤器:
-4,">=,>=,*"
10,minpoint
-4,"<=,<=,*"
10,maxpoint
顶超版的回复 很直接的方法 我试试 感谢超版成功了贴代码封贴
Function CreateSelectionSet(Optional SSetName As String = "mjtd") As AcadSelectionSet
On Error Resume Next
ThisDrawing.SelectionSets(SSetName).Delete
Set CreateSelectionSet = ThisDrawing.SelectionSets.Add(SSetName)
End Function
'================================================
Sub tsts()
Dim ss_ob As AcadSelectionSet
Set ss_ob = CreateSelectionSet("ssss")
Dim mode As Integer
Dim corner1(0 To 2) As Double
Dim corner2(0 To 2) As Double
mode = acSelectionSetCrossing
corner1(0) = 0: corner1(1) = 0: corner1(2) = 0
corner2(0) = 9: corner2(1) = 1.72: corner2(2) = 0
Dim gpCode(0 to 4) As Integer
Dim dataValue(0 to 4) As Variant
gpCode(0) = 0
dataValue(0) = "TEXT"
gpCode(1) = -4
dataValue(1) = ">=,>=,*"
gpCode(2) = 10
dataValue(2) = corner1
gpCode(3) = -4
dataValue(3) = "<=,<=,*"
gpCode(4) = 10
dataValue(4) = corner2
Dim groupCode As Variant, dataCode As Variant
groupCode = gpCode
dataCode = dataValue
ss_ob.Select mode, corner1, corner2, groupCode, dataCode
MsgBox ss_ob.Count
'ss_ob.Item(0).Delete
ss_ob.delete
End Sub
页:
[1]