Private Sub cmdGetCoor_Click()
Dim i As Integer
Dim objGen As AcadEntity
Dim objPoint1 As AcadPoint
'Set objACad = New AutoCAD.AcadApplication
If objACad.ActiveDocument.PickfirstSelectionSet.Count > 0 Then
For i = 0 To objACad.ActiveDocument.PickfirstSelectionSet.Count - 1
If objGen.ObjectName = "acDbPoint" Then
Set objPoint1 = objGen
Debug.Print objPoint1.Coordinates(0) 'X
Debug.Print objPoint1.Coordinates(1) 'Y
Debug.Print objPoint1.Coordinates(2) 'Z
End If
Next
End If
End Sub
Сейчас этот форум просматривают: Google-бот и гости: 75