Sub 이동예제()
On Error Resume Next
If ThisDrawing.SelectionSets(“SSET”) Then _
ThisDrawing.SelectionSets(“SSET”).Delete
On Error GoTo 0
Dim ssetObj As AcadSelectionSet
Set ssetObj = ThisDrawing.SelectionSets.Add(“SSET”)
ssetObj.SelectOnScreen
Dim point1(0 To 2) As Double
Dim point2(0 To 2) As Double
point1(0) = 0: point1(1) = 0: point1(2) = 0
point2(0) = 200: point2(1) = 0: point2(2) = 0
For Each 한개성분 In ssetObj
한개성분.Move point1,point2
Next 한개성분
ThisDrawing.Application.Update
ThisDrawing.SelectionSets(“SSET”).Delete
End Sub
——————————————————————————————————————–
여기서
안녕하세요. 궁금한 사항있어서 글 남김니다.
point2(0) = 200: point2(1) = 0: point2(2) = 0
부분을 값이 아닌 마우스로 위치를 찍어 이동하고자 하는 경우는 어떻게 코딩을 해야 하나요?
VAB초보라 아직 많은 명령어를 숙지하지 못하였습니다.ㅠ..ㅠ
Dim point1 As Variant
Dim point2 As Variant
point1 = ThisDrawing.Utility.GetPoint(, “1st point:”)
point2 = ThisDrawing.Utility.GetPoint(point1, “2st point:”)
xcsh 정말 감사합니다. ^^ 많은 도움이 되었습니다..^^
긴세월 이것저것 주워먹다보니 배탈만 났습니다. 제대로 하는건 하나도 없어요.
도움말만 봐도 나오는것이라 아는것 뿐입니다.
상큼메론90님이 새콤한 지혜좀 주십시오. 감사합니다.