这一举动效果很好,谢谢你们!
现在我知道如何移动一个set,但仍然没有设置inbase变量?
这是我得到的
- Sub MoveSsettoZeroZero()
- On Error Resume Next
- ThisDrawing.SelectionSets.Item("Selection1").Delete
-
- Dim Sset As AcadSelectionSet
- Dim Obj As AcadObject
- Dim ZeroZero(0 To 2) As Double
- Dim Pnt As Variant
-
- ZeroZero(0) = 0: ZeroZero(1) = 0: ZeroZero(2) = 0
- Set Sset = ThisDrawing.SelectionSets.Add("Selection1")
- Sset.SelectOnScreen
- Debug.Print "Selection Set " & "("; Sset.Name; ")" & " was created"
-
- Pnt = ThisDrawing.Utility.GetPoint(, vbCrLf & "Pickpoint")
- Debug.Print "Point = "; Pnt(0) & " , " & Pnt(1)
-
- For Each Obj In Sset
- Obj.Move Pnt, ZeroZero
- Next Obj
-
-
- ThisDrawing.SetVariable "INSBASE", ("0, 0, 0")
-
- ThisDrawing.SelectionSets.Item("Selection1").Delete
- End Sub
|