- 积分
- 73549
- 明经币
- 个
- 注册时间
- 2001-6-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2003-7-21 20:18:00
|
显示全部楼层
- Public SSetObj As AcadSelectionSet
- Public EntObj As AcadEntity
- Private Sub www()
- Dim fType As Variant
- Dim fData As Variant
-
- On Error Resume Next
- Set SSetObj = ThisDrawing.SelectionSets("test")
- If Err.Number <> 0 Then
- Err.Clear
- Set SSetObj = ThisDrawing.SelectionSets.Add("test")
- End If
- SSetObj.Clear
- BuildFilter fType, fData, [b]-4, "<or", [/b]0, "text", 0, "mtext", _
- 0, "AcDbAlignedDimension", 0, "AcDbRotatedDimension",[b] -4, "or>"[/b]
- SSetObj.SelectOnScreen fType, fData
- Dim bl
- bl = EntObj.TextString
-
- End Sub
- Public Sub BuildFilter(typeArray, dataArray, ParamArray gCodes())
- Dim fType() As Integer, fData()
- Dim index As Long, i As Long
-
- index = LBound(gCodes) - 1
-
- For i = LBound(gCodes) To UBound(gCodes) Step 2
- index = index + 1
- ReDim Preserve fType(0 To index)
- ReDim Preserve fData(0 To index)
- fType(index) = CInt(gCodes(i))
- fData(index) = gCodes(i + 1)
- Next
- typeArray = fType: dataArray = fData
- End Sub
|
|