- 积分
- 626
- 明经币
- 个
- 注册时间
- 2010-6-21
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
采用move, copy和mirror, ScaleEntity方法创建了一些封闭多段线图形(原封闭多段线图形是空间里手动画上去的)
很奇怪的是我采用.Select acSelectionSetCrossing, startpoint, endpoint, FilterType, FilterData方法可以把move, copy后来创建的封闭多段线添加到集合里去,但是无法把mirror, ScaleEntity方法创建的封闭多段线添加到集合里去。
但如果我先把dwg文件保存一下,再打开用.Select acSelectionSetCrossing, startpoint, endpoint, FilterType, FilterData,就可以选中原来mirror/ScaleEntity方法生成的图形。很困惑??这是为什么?难道mirror/ScaleEntity当时生成的对象属性什么的变了?
选中的那段如下
Sub kk()
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
Dim spoint1(0 To 2) As Double
Dim spoint2(0 To 2) As Double
Dim myset3 As AcadSelectionSet
Dim flag3 As Boolean
Dim Moveobj As AcadEntity
flag3 = False
For Each myset3 In ThisDrawing.SelectionSets
If myset3.Name = "total" Then
flag3 = True
Exit For
End If
Next
If flag3 = True Then
myset3.Delete
End If
spoint1(0) = 4000
spoint1(1) = 505
spoint2(0) = 12000
spoint2(1) = 990
Set myset3 = ThisDrawing.SelectionSets.Add("total")
FilterType(0) = 0
FilterData(0) = "*POLYLINE"
myset3.Select acSelectionSetCrossing, spoint1, spoint2, FilterType, FilterData
For Each Moveobj In myset3
Moveobj.Highlight True
Next
End Sub
创建的图形(白色为原始的,其他颜色为后创建的)
Mirror和ScaleEntity选不中的图形
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
|