Rotate Пример |
Sub Example_Rotate() 'Этот пример создает легкую ломаную линию и затем вращает её. 'Создайте ломаную линию Dim plineObj As AcadLWPolyline Dim points(0 To 11) As Double points(0) = 1: points(1) = 2 points(2) = 1: points(3) = 3 points(4) = 2: points(5) = 3 points(6) = 3: points(7) = 3 points(8) = 4: points(9) = 4 points(10) = 4: points(11) = 2 Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points) plineObj.Closed = True ZoomAll MsgBox "Вращайте ломаную линию на 45 градусов.", , "Rotate Пример" 'Определите поворот Dim basePoint(0 To 2) As Double Dim rotationAngle As Double basePoint(0) = 4: basePoint(1) = 4.25: basePoint(2) = 0 rotationAngle = 0.7853981 ' 45 degrees 'Вращайте ломаную линию plineObj.Rotate basePoint, rotationAngle ZoomAll MsgBox "Поворот закончен.", , "Rotate Пример" End Sub